GADT bug in 20041124
Simon Peyton-Jones
simonpj at microsoft.com
Fri Dec 3 08:56:30 EST 2004
Thanks for this. Now fixed.
Simon
| -----Original Message-----
| From: cvs-all-bounces at haskell.org [mailto:cvs-all-bounces at haskell.org]
On Behalf Of Keith
| Wansbrough
| Sent: 26 November 2004 14:36
| To: cvs-ghc at haskell.org
| 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
|
| > kw217 at ged:~/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
| > glasgow-haskell-bugs at haskell.org,
| > 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
| Cvs-ghc at haskell.org
| http://www.haskell.org/mailman/listinfo/cvs-ghc
More information about the Cvs-ghc
mailing list