bad error message with GADTs
David Roundy
droundy at darcs.net
Wed Nov 29 19:18:48 EST 2006
The following code gives a rather unpleasant error message with ghc 6.6.
Adding the type signature fixes the error.
David
{-# OPTIONS -fglasgow-exts #-}
data PatchSeq p a b where
Nil :: PatchSeq p a a
U :: p a b -> PatchSeq p a b
(:-) :: PatchSeq p a b -> PatchSeq p b c -> PatchSeq p a c
-- is_normal :: PatchSeq p a b -> Bool
is_normal Nil = True
is_normal (U _) = True
is_normal (U _ :- _) = True
is_normal _ = False
More information about the Glasgow-haskell-bugs
mailing list