Some tidying up of type pretty-printing
[ghc.git] / testsuite / tests / typecheck / should_fail / tcfail172.hs
1 {-# LANGUAGE GADTs #-}
2
3 -- This one made GHC 6.6 give the very unhelpful error
4 -- Foo8.hs:11:10:
5 -- Couldn't match kind `?' against `* -> * -> *'
6 -- When matching the kinds of `t :: ?' and `t1 :: * -> * -> *'
7 -- Expected type: t1
8 -- Inferred type: t
9 -- In the pattern: Nil
10
11 module ShouldFail where
12
13 data PatchSeq p a b where
14 Nil :: PatchSeq p a a
15 U :: p a b -> PatchSeq p a b
16 (:-) :: PatchSeq p a b -> PatchSeq p b c -> PatchSeq p a c
17
18 -- is_normal :: PatchSeq p a b -> Bool
19 is_normal Nil = True
20 is_normal (U _) = True
21 is_normal (U _ :- _) = True
22 is_normal _ = False