iserv-proxy: iserv allows GHC to delegate Tempalte Haskell computations

This is a package candidate release! Here you can preview how this package release will appear once published to the main package index (which can be accomplished via the 'maintain' link below). Please note that once a package has been published to the main package index it cannot be undone! Please consult the package uploading documentation for more information.

[maintain]

Warnings:

GHC can be provided with a path to the iserv binary with -pgmi=pathto/iserv-bin, and will in combination with -fexternal-interpreter, compile Template Haskell though the iserv-bin delegate. This is very similar to how ghcjs has been compiling Template Haskell, by spawning a separate delegate (so called runner on the javascript vm) and evaluating the splices there.

iserv can also be used in combination with cross compilation. For this, the iserv-proxy needs to be built on the host, targeting the host (as it is running on the host). cabal install -flibrary -fproxy will yield the proxy.

Using the cabal for the target arch-platform-target-cabal install -flibrary will build the required library that contains the ffi startSlave function, which needs to be invoked on the target (e.g. in an iOS application) to start the remote iserv slave.

calling the GHC cross compiler with -fexternal-interpreter -pgmi=$HOME.cabalbin/iserv-proxy -opti<ip address> -opti<port> will cause it to compile Template Haskell via the remote at <ip address>.

Thus to get cross compilation with Template Haskell follow the following receipt:

iserv $ arch-platform-target-cabal install -flibrary
 void startSlave(false /* verbose */, 5000 /* port */,
                 "/path/to/storagelocation/on/target");
iserv $ cabal install -flibrary -fproxy
project $ arch-platform-target-ghc ModuleContainingTH.hs \
            -fexternal-interpreter \
            -pgmi=$HOME/.cabal/bin/iserv-proxy \
            -opti10.0.0.1 -opti5000

Should something not work as expected, provide -opti-v for verbose logging of the iserv-proxy.

Properties

Version8.5
Change logNone available
Dependenciesarray (==0.5.*), base (==4.*), binary (>=0.7 && <0.9), bytestring (==0.10.*), containers (==0.5.*), deepseq (==1.4.*), directory (==1.3.*), filepath (==1.4.*), ghci (==8.5), libiserv (==8.5), network (>=2.6) [details]
LicenseBSD-3-Clause
CopyrightXXX
AuthorXXX
MaintainerXXX
CategoryDevelopment
Executablesiserv-proxy
UploadedThu Mar 15 14:23:58 UTC 2018 by angerman

Downloads

Maintainers' corner

For package maintainers and hackage trustees