Commit 19e94e72 authored by simonpj's avatar simonpj
Browse files

[project @ 2002-06-20 08:35:55 by simonpj]

Add test for instance decl context validity
parent e9482779
......@@ -105,3 +105,4 @@ test "tcfail104" { vtcf("") }
test "tcfail105" { vtcf("") }
test "tcfail106" { vtcf("") }
test "tcfail107" { vtcf("") }
test "tcfail108" { vtcf("") }
-- The instance decl is illegal without -fallow-undecidable-instances
module ShouldFail where
data Rec f = In (f (Rec f))
instance Eq (f (Rec f)) => Eq (Rec f) where
(In x) == (In y) = x == y
tcfail108.hs:7:
Non-type variables in constraint: Eq (f (Rec f))
(Use -fallow-undecidable-instances to permit this)
In the context: (Eq (f (Rec f)))
While checking the context of an instance declaration
In the instance declaration for `Eq (Rec f)'
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment