Testsuite: tabs -> spaces [skip ci]
[ghc.git] / testsuite / tests / typecheck / should_compile / tc162.hs
1 {-# LANGUAGE RankNTypes #-}
2
3 -- These ones failed with 5.04. They need a coercion
4 -- in the pattern matching compiler, so they are a bit
5 -- tricky.
6
7 -- GHC 6.3: these are back to failures, because we no longer do
8 -- type subsumption in pattern-matching
9
10 -- GHC 7.0: back to success
11
12 module ShouldCompile where
13
14 newtype Bug s a = Bug a
15
16 runBug :: (forall s. Bug s a) -> a
17 runBug (Bug _) = undefined
18
19 newtype BugN s a = BugN a
20
21 runBugN :: (forall s. BugN s a) -> a
22 runBugN (BugN _) = undefined
23
24 data Foo a b = Foo { foo :: a -> b }
25
26 baz :: String -> (forall a b . Foo a b) -> IO ()
27 baz s (Foo { foo = foo }) = putStrLn s