Cross-compiling Template Haskell via -fexternal-interpreter and IPC
Simon Marlow
marlowsd at gmail.com
Thu Jul 7 07:30:40 UTC 2016
On 6 July 2016 at 18:14, Ben Gamari <ben at smart-cactus.org> wrote:
>
> Alberto Valverde <alberto at toscat.net> writes:
>
> > I've hacked around this to test the feasibility of the approach by using
> > stdin/stdout instead of creating new pipes and, surprisingly, managed to
> > cross-compile a simple Template Haskell program.
> >
> Well done!
>
Indeed, nice hacking :)
> > I'm considering using a socket for communicating between both processes
> as
> > a more permanent solution but this would incur in a dependency on the
> > "network" package. Would this be acceptable?
> >
> 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.
>
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.
Cheers,
Simon
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.haskell.org/pipermail/ghc-devs/attachments/20160707/96e48c19/attachment.html>
More information about the ghc-devs
mailing list