Commit 9a836189 authored by simonpj's avatar simonpj
Browse files

[project @ 2001-10-16 15:32:57 by simonpj]

Add a test I had hanging around; maybe merge to branch
parent 39ba82a9
......@@ -14,6 +14,7 @@ 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
class Wob a
instance Wob a => Wob Bool
f :: Eq a => Int -> Int
f x = x
class Foo a where
op :: Eq a => a -> a
We should get errors for
class Foo a where
op :: Eq a => a -> a
and
instance Wob a => Wob Bool
as well!
rnfail014.hs:12:
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'
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