Cross-compiling Template Haskell via -fexternal-interpreter and IPC
Alberto Valverde
alberto at toscat.net
Thu Jul 7 10:36:29 UTC 2016
On Thu, Jul 7, 2016 at 2:57 AM, Moritz Angermann <moritz at lichtzwerge.de>
wrote:
> Great work Alberto,
>
>
Thanks :)
> I’m in favor of adding some form of network layer, as there are scenarios
> where you have to run the th compilation process on a different machine.
> This would be the case for iOS for example.
>
> When I toyed with this ~2years ago, trying to port the out of process th
> solution from ghcjs, I tried to use GHC’s plugin interface, to load the
> module that would allow ghc to communicate with the runner on the device.
>
> This in principle allows to have more dependencies on the plugin and not
> force them into ghc. At the same time it requires the installation of some
> additional hooks into the plugin system.
>
> I guess one could also come up with a tiny proxy that pretends to be the
> iserv endpoint and would forward anything over a network layer; this again
> could probably work outside of ghc.
I'm pretty sure this can be done by adding networking capabilities to just
iserv without adding networking capabilities to GHC itself.
However, I'm not sure if this could cause a linking problem if GHC requests
iserv to load a different version of the "network" library than the one it
was compiled against.
Cheers
Alberto
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.haskell.org/pipermail/ghc-devs/attachments/20160707/fee7ce46/attachment.html>
More information about the ghc-devs
mailing list