From: simonpj@microsoft.com Date: Thu, 23 Jul 2009 13:01:45 +0000 (+0000) Subject: Fix Trac #3012: allow more free-wheeling in standalone deriving X-Git-Url: http://git.megacz.com/?a=commitdiff_plain;h=aa0c0de94e25aa64139688f8e4c4ba51ddca6f54;hp=aa0c0de94e25aa64139688f8e4c4ba51ddca6f54;p=ghc-hetmet.git Fix Trac #3012: allow more free-wheeling in standalone deriving In standalone deriving, we now do *not* check side conditions. We simply generate the code and typecheck it. If there's a type error, it's the programmer's problem. This means that you can do 'deriving instance Show (T a)', where T is a GADT, for example, provided of course that the boilerplate code does in fact typecheck. I put some work into getting a decent error message. In particular if there's a type error in a method, GHC will show the entire code for that method (since, after all, the user did not write it). Most of the changes are to achieve that goal. Still to come: changes in the documentation. ---