[Template-haskell] GADTs

Einar Karttunen ekarttun at cs.helsinki.fi
Sat Aug 12 07:50:55 EDT 2006


On 12.08 10:26, Ian Lynagh wrote:
> On Sat, Aug 12, 2006 at 10:26:06AM +0300, Einar Karttunen wrote:
> > On 11.08 23:25, Ian Lynagh wrote:
> > > If you have any objections or comments then please let me know;
> > > otherwise I think it would be great to get this into GHC 6.6.
> > 
> > Why not simple represent all data declarations as GADT to the user?
> 
> Because GADTs cannot represent record constructors. I didn't make GadtC
> a constructor for Con as I don't think you could pretty-print a
> datatype with both GADT and record constructors.

GHC 6.5 does support that.


http://www.haskell.org/hawiki/GADT_20with_20record_20syntax

> Also, TH tries to present the completely sugared language to the user;
> otherwise it would probably work on something more like core.
>

Point. Usually when using TH I *wish* it was more like core - 
or that there would be at least a way to simplify expressions.

- Einar Karttunen


More information about the template-haskell mailing list