Re: GHCJS now runs Template Haskell on node.js - Any interest in out of process TH for general cross compilation?

2014-07-05 Thread Luite Stegeman
I'm not sure I correctly understand your approach, but to have the template haskell reification work without any runtime communication with the compiler you'd have to include the entire typechecker state, at least for all names reachable from the splice (see http://hackage.haskell.org/package/templ

Re: GHCJS now runs Template Haskell on node.js - Any interest in out of process TH for general cross compilation?

2014-07-05 Thread John Meacham
The target compiler would have the TH libraries, which could be made to be portable. The external program would just extract the TH bits and turn them into a program that spits the TH expanded output to a new file to compile, and repeat the process til no TH expansions exist and finally that is the

Re: GHCJS now runs Template Haskell on node.js - Any interest in out of process TH for general cross compilation?

2014-07-05 Thread Luite Stegeman
How would you do reification with that approach? On Sat, Jul 5, 2014 at 9:59 PM, John Meacham wrote: > Actually, I was looking into it a little, and template haskell could > effectively be implemented by a pre-processor and a portable library > that is compiler independent. If one could get ghc

Re: GHCJS now runs Template Haskell on node.js - Any interest in out of process TH for general cross compilation?

2014-07-04 Thread John Meacham
Hmm.. It works on my nexus 4. Kiwamu of the metasepi http://ajhc.metasepi.org/ is the one that uploaded the demo. Perhaps he needs to update the key or something. On Thu, Jul 3, 2014 at 9:43 PM, Dominick Samperi wrote: > Hello John, > I tried to install the Haskell demo Cube on my Nexus 7 > and g

Re: GHCJS now runs Template Haskell on node.js - Any interest in out of process TH for general cross compilation?

2014-07-04 Thread Luite Stegeman
On Thu, Jul 3, 2014 at 6:18 PM, Simon Peyton Jones wrote: > Luite > > > > I lack the bandwidth to respond at any technical depth, but I’d like to > make encouraging noises. If you can figure out a way to make GHC do these > things without making the compiler terribly complicated and making > ma

Re: GHCJS now runs Template Haskell on node.js - Any interest in out of process TH for general cross compilation?

2014-07-03 Thread Dominick Samperi
Hello John, I tried to install the Haskell demo Cube on my Nexus 7 and got: Error: package file was not signed correctly. D On Thu, Jul 3, 2014 at 4:47 PM, John Meacham wrote: > In case anyone wanted to start writing haskell android code now, jhc > fully supports android as a target. here is an a

Re: GHCJS now runs Template Haskell on node.js - Any interest in out of process TH for general cross compilation?

2014-07-03 Thread John Meacham
In case anyone wanted to start writing haskell android code now, jhc fully supports android as a target. here is an app made with it https://play.google.com/store/apps/details?id=org.metasepi.ajhc.android.cube this was made with Kiwamu's ajhc branch but code has been merged back into the main tre

RE: GHCJS now runs Template Haskell on node.js - Any interest in out of process TH for general cross compilation?

2014-07-03 Thread Simon Peyton Jones
Luite I lack the bandwidth to respond at any technical depth, but I’d like to make encouraging noises. If you can figure out a way to make GHC do these things without making the compiler terribly complicated and making maintaining it harder, then I’m open to your proposals. Several people see

Re: GHCJS now runs Template Haskell on node.js - Any interest in out of process TH for general cross compilation?

2014-07-03 Thread Luite Stegeman
I think GHC could use more or less the same communication method as GHCJS now does: Start some user-specifiied process and send messages through pipes (GHCJS uses stdin/stderr of the node process), with the difference that it would get dynamic libraries for the target rather than blobs of JS code.

Re: GHCJS now runs Template Haskell on node.js - Any interest in out of process TH for general cross compilation?

2014-07-03 Thread CJ van den Berg
Yes! This would definitely be of great interest to users of the Android cross compilers. It should be quite feasible to drive a TH runner process on a development device or emulator. Having genuine TH support would be a huge improvement to the usefulness of GHC in a cross compiling scenario. I wou

Re: GHCJS now runs Template Haskell on node.js - Any interest in out of process TH for general cross compilation?

2014-07-02 Thread Carter Schonwald
This would probably be a great boon for those trying to use haskell for Android and IOS right? how might the emulation setup work for those? On Wed, Jul 2, 2014 at 2:20 PM, Carter Schonwald wrote: > wow, this is great work! > > If theres a clear path to getting the generic tooling into 7.10,

Re: GHCJS now runs Template Haskell on node.js - Any interest in out of process TH for general cross compilation?

2014-07-02 Thread Carter Schonwald
wow, this is great work! If theres a clear path to getting the generic tooling into 7.10, i'm all for it :) (and willing to help on concrete mechanical subtasks) On Wed, Jul 2, 2014 at 12:14 PM, Luite Stegeman wrote: > hi all, > > I've added some code [1] [2] to GHCJS to make it run Template H