GADT Strangeness

Simon Peyton-Jones simonpj at
Mon Jan 5 03:55:38 EST 2009

| Thanks very much for this. I would never have guessed to use
| -XRelaxedPolyRec given the error message.
| Is it worth noting it here
| or is it something that has always existed with GADTs and I just didn't
| trip over it?

I've added a para.  Good idea.

| > This is a nasty corner I agree.  GHC requires -XGADTs for you to
| > *define* a GADT. Perhaps it should also require -XGADTs for you to
| > *match against* one (as you are doing here).  That would avoid this
| > particular hole.  If you think that would be a step forward, do put
| > forward a Trac feature request, and encourage others to support it.
| I would vote for this. In fact I was mildly surprised I could use GADTs
| without specifying -XGADTs.
| I noticed that Isaac Dupree has already raised a ticket
| so
| I will add my support to it.

OK.  let's see if anyone else comments.  Do ping me in a while to action it if I forget.


More information about the Glasgow-haskell-users mailing list