Commit 0f2c5241 authored by simonmar's avatar simonmar
Browse files

[project @ 2001-08-24 15:17:29 by simonmar]

These two tests collectively used to be rnfail014.  tcfail097 works,
tcfail098 currently fails.
parent a88abab5
......@@ -88,3 +88,5 @@ test "tcfail093" { vtcf("") }
test "tcfail094" { vtcf("") }
test "tcfail095" { vtcf("") }
test "tcfail096" { vtcf("") }
test "tcfail097" { vtcf("") }
test "tcfail098" { vtcf("") }
module ShouldFail where
-- !!! Ambiguous constraint in type signature
f :: Eq a => Int -> Int
f x = x
Ambiguous constraint `Eq a'
At least one of the forall'd type variables mentioned by the constraint
must be reachable from the type after the =>
In the type: forall a. (Eq a) => Int -> Int
While checking the type signature for `f'
module ShouldFail where
-- !!! ambiguous constraint in the context of an instance declaration
class Bar a
instance Bar a => Bar Bool
-- !!! constraining the type variable in a class head is illegal
class Foo a where
op :: Eq a => a -> a
Supports Markdown
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