Exposing newtype coercions to Haskell

Nicolas Frisby nicolas.frisby at gmail.com
Tue Jul 16 18:21:56 CEST 2013

It's available here (for now).


Sorry for the whack build/test infrastructure: I wasn't planning sharing
this write-once experimental code.

The 'MyTcRnDriver.initTcFromModGuts` function and the
'TcRnPlugin.append_guts` are the key functions.

The rest of 'MyTcRnDriver` is only necessary because 'tcRnModule` is a big
function that bakes in its own invocation of 'initTc`. Most other functions
in the tcrn don't do this. I hope to patch GHC to factor 'tcRnModule` a bit
and export the pieces so that it can be re-used with 'initTcFromModGuts`

Note the TODOs; mostly they focus on stuff like hpc and Safe Haskell. Basic
functionality seems fine.


On Tue, Jul 16, 2013 at 8:31 AM, Joachim Breitner
<mail at joachim-breitner.de>wrote:

> Hi,
> Am Dienstag, den 16.07.2013, 07:44 -0500 schrieb Nicolas Frisby:
> > It allows you to execute TcRn computations (without manually
> > reinitializing its monadic inputs), which is a prerequisite for
> > invoking most functions from the type checker or renamer. I anticipate
> > that such invocations will be helpful in your task.
> I see; in that case: Thanks!
> Greetings,
> Joachim
> --
> Joachim Breitner
>   e-Mail: mail at joachim-breitner.de
>   Homepage: http://www.joachim-breitner.de
>   ICQ#: 74513189
>   Jabber-ID: nomeata at joachim-breitner.de
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.haskell.org/pipermail/ghc-devs/attachments/20130716/9d9c9ed5/attachment.htm>

More information about the ghc-devs mailing list