Ticket #2112 (closed merge: fixed)
Bad error message for malformed GADTs
Compiling the following code:
data Foo a where Bar :: a -> a
results in the following error message:
$ ghc-6.8.1 gadt.hs -XGADTs gadt.hs:5:3: Malformed constructor result type: a In the result type of a data constructor: a In the data type declaration for `Foo' $
It would be nice if the error message mentioned the name of the offending data constructor (Bar in this case) -- since there might be more than one.