[Haskell] deriving Show for GADT?

Simon Peyton-Jones simonpj at microsoft.com
Tue Apr 14 04:10:58 EDT 2009


Yes, indeed, see http://hackage.haskell.org/trac/ghc/ticket/3012

Incidentally, the main Haskell list isn't the right place for GHC-specific questions.  glasgow-haskell-users at haskell.org is the place

Simon

| -----Original Message-----
| From: haskell-bounces at haskell.org [mailto:haskell-bounces at haskell.org] On Behalf Of
| Norman Ramsey
| Sent: 14 April 2009 05:28
| To: haskell at haskell.org
| Subject: [Haskell] deriving Show for GADT?
|
| I've got a fairly large GADT for which I wished to use
|    deriving (Show)
| but I got a mysterious error message:
|
| Exp.hs:13:11:
|     Can't make a derived instance of `Show (Exp a)'
|       (`Exp' has non-Haskell-98 constructor(s))
|     In the data type declaration for `Exp'
|
|
| This is from GHC.  Does anybody know a compiler option or other trick
| that will coax the compiler into producing a Show instance.
| (I know I can write one by hand, but I'd rather not bother.)
|
|
| Norman
| _______________________________________________
| Haskell mailing list
| Haskell at haskell.org
| http://www.haskell.org/mailman/listinfo/haskell



More information about the Glasgow-haskell-users mailing list