Thanks for this. Now fixed. Simon
| -----Original Message----- | From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Keith | Wansbrough | Sent: 26 November 2004 14:36 | To: [EMAIL PROTECTED] | Subject: GADT bug in 20041124 | | Hi all (long time no see!)... | | Keen to try out the new GADT stuff, I downloaded a CVS snapshot of | ghc-6.3.20041124. Having built it, I discovered a bug. The program | | > module GADTest where | > | > data Expr :: * -> * where | > EInt :: Int -> Expr Int | > EBool :: Bool -> Expr Bool | > EIf :: (Expr Bool) -> (Expr a) -> (Expr a) -> Expr a | | yields | | > [EMAIL PROTECTED]:~/Misc/Haskell$ ghc -fglasgow-exts -c GADTest.hs | > ghc-6.3.20041124: panic! (the `impossible' happened, GHC version | > 6.3.20041124): | > types/Type.lhs:(996,0)-(997,77): Non-exhaustive patterns in | > function zip_ty_env | > | > | > Please report it as a compiler bug to | > [EMAIL PROTECTED], | > or http://sourceforge.net/projects/ghc/. | | Note that removing the EIf line, or writing "Expr a" rather than "Expr | :: * -> *", makes the error go away. Writing "Expr :: *" instead | gives a kind error, of course. | | --KW 8-) | _______________________________________________ | Cvs-ghc mailing list | [EMAIL PROTECTED] | http://www.haskell.org/mailman/listinfo/cvs-ghc _______________________________________________ Cvs-ghc mailing list [EMAIL PROTECTED] http://www.haskell.org/mailman/listinfo/cvs-ghc
