Cross-compiling Template Haskell via -fexternal-interpreter and IPC

Alberto Valverde alberto at
Thu Jul 7 00:01:26 UTC 2016

Ben, Phyx,

On Wed, Jul 6, 2016 at 7:14 PM, Ben Gamari <ben at> wrote:

> (...)
> Ahh, right. Out of curiosity what toolchain are you using to build your
> stage 1 cross compiler?

I'm using an MXE ( environment in a Debian Jessie Docker
image which has gcc-4.9.3. The build env is here:

On Wed, Jul 6, 2016 at 7:14 PM, Ben Gamari <ben at> wrote:

> It would be nice if we could avoid it; GHC depending upon a library has
> the very unfortunate effect that any user code also needing to link
> against GHC or one of its libraries now has no choice in the version of
> that library. We go to some lengths to try to keep the dependency
> footprint of GHC small for this reason.

> > Named pipes have also crossed my mind but I'm not sure how well they're
> > supported by wine.
> >
> It would be great if there were some way we could make this work with
> named pipes. Not only does it side-step the dependency issue, but it
> feels like the right way forward.

 On Wed, Jul 6, 2016 at 8:05 PM, Phyx <lonetiger at> wrote:

> Named pipes would solve your issue, Just don't forget to set the proper
> ACL on the pipes.
It does indeed work! However, I've broken GHC on a Windows host until I
implement the equivalent to Posix.createNamedPipe since it seems there's no
binding for CreateNamedPipe that I can find in the tree. I'll look into it

I've pushed the changes so far to


> Cheers,
> - Ben
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <>

More information about the ghc-devs mailing list