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

Moritz Angermann moritz at
Sat May 27 08:51:26 UTC 2017

Hi Alberto,

let me know if I can be of help. As you likely saw I’ve been writing this
all up on  With the outstanding diffs[1], this
should hopefully just work.  As I haven’t used windows or know the linker
on windows, I’m not perfectly sure about the implications.  It could *just
work* though.  Maybe you can even use the GHCSlave’s Slave.hs[2] for the
Raspberry Pi for windows, as it doesn’t encode any Raspberry Pi specifics.

All you would need is to run GHCSlave on wine / or a windows system with
some form of network interface, so that the iserv-proxy and GHCSlave can


[1]: you can just use the my-ghc branch from

> On May 27, 2017, at 4:29 PM, Alberto Valverde <alberto at> wrote:
> Hi Ben,
> I've just found this email from almost a year ago. Sorry for ignoring it until now. Given the date it was sent I think I missed it when it was fresh while I was on vacation.
> Regarding the question, I have abandoned the work I was doing on getting cross-compilation for Windows to work since my employer decided a Windows build for the app we were developing could wait some time and tasked me we something else.
> However, I see that Moritz is working on cross-compilation right now so I'll try get some time to see if I can get his approach to work for our use-case and give some feedback or help in any way.
> Alberto
> On Fri, Aug 26, 2016 at 4:56 PM, Ben Gamari <ben at> wrote:
> Alberto Valverde <alberto at> writes:
> > On Thu, Jul 7, 2016 at 9:30 AM, Simon Marlow <marlowsd at> wrote:
> >
> >> I agree, named pipes are probably a better plan, perhaps a better solution
> >> overall than the way we currently pass FD numbers on the command line.  Do
> >> named pipes work work as expected through wine?  We would have to be
> >> careful to clean them up again afterwards.
> >>
> >
> > I've implemented IPC with named pipes and it appeared to work through wine
> > but now I'm investigating an issue which causes GHC to "freeze" when
> > talking to the external interpreter when it is not running on a TTY (ie: in
> > a build process)
> Hi Alterto,
> What ever happened to this? Is there any way I can be of assistance? It
> would be great to get this merged.
> Cheers,
> - Ben

More information about the ghc-devs mailing list