Improve error messages around kind mismatches.
[ghc.git] / testsuite / tests / typecheck / should_fail / T7264.hs
1 {-# LANGUAGE RankNTypes #-}
2 module T7264 where
3
4 data Foo = Foo (forall r . r -> String)
5
6 mmap :: (a->b) -> Maybe a -> Maybe b
7 mmap f (Just x) = Just (f x)
8 mmap f Nothing = Nothing
9
10 -- mkFoo2 :: (forall r. r -> String) -> Maybe Foo
11 -- Should be rejected because it requires instantiating
12 -- mmap at a polymorphic type
13 mkFoo2 val = mmap Foo (Just val)