patch applied (ghc): Fix Trac #3965: tighten conditions when
deriving Data
Simon Peyton Jones
simonpj at microsoft.com
Thu May 6 12:50:08 EDT 2010
Fri Apr 9 11:44:20 PDT 2010 simonpj at microsoft.com
* Fix Trac #3965: tighten conditions when deriving Data
It's tricky to set up the context for a Data instance. I got it wrong
once, and fixed it -- hence the "extra_constraints" in
TcDeriv.inferConstraints.
But it still wasn't right! The tricky bit is that dataCast1 is only
generated when T :: *->*, and dataCast2 when T :: *->*->*. (See
the code in TcGenDeriv for dataCastX.
M ./compiler/typecheck/TcDeriv.lhs -8 +14
View patch online:
http://darcs.haskell.org/cgi-bin/darcsweb.cgi?r=ghc;a=darcs_commitdiff;h=20100409184420-1287e-797ef851921f64e3563eae5626faa8836a8f315e.gz
More information about the Cvs-ghc
mailing list