Commit ae578d6f authored by simonmar's avatar simonmar
Browse files

[project @ 2001-08-24 15:18:35 by simonmar]

This test moved to typecheck/should_fail/tcfail0{97,98}
parent 0f2c5241
......@@ -14,7 +14,6 @@ test "rnfail010" { vtcf("") }
test "rnfail011" { vtcf("") }
test "rnfail012" { vtcf("") }
test "rnfail013" { vtcf("") }
test "rnfail014" { vtcf("") }
test "rnfail015" { vtcf("") }
test "rnfail016" { vtcf("") }
test "rnfail017" { vtcf("") }
......
{- Check that the context of a type does not
constrain any in-scope variables, and only constrains
type variables free in the type.
-}
module Foo where
instance Eq a => Eq Bool where
(==) = error "help"
f :: Eq a => Int -> Int
f x = x
class Foo a where
op :: Eq a => a -> a
rnfail014.hs:8:
Ambiguous constraint `Eq a'
in the type: Eq Bool
Each forall-d type variable mentioned by the constraint must appear after the =>.
In the type signature for an instance decl
rnfail014.hs:12:
Ambiguous constraint `Eq a'
in the type: Int -> Int
Each forall-d type variable mentioned by the constraint must appear after the =>.
In the type signature for `f'
rnfail014.hs:17:
All of the type variable(s) in the constraint `Eq a' are already in scope
At least one must be universally quantified here
In the type signature for `op'
Compilation had errors
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