status of template haskell + cross compiling plans for 7.8?

Carter Schonwald carter.schonwald at gmail.com
Fri Jun 14 08:59:05 CEST 2013


Which raises the question then: what would be needed to make this happen by
7.10, if not sooner?

naively, I'd imagine one part of the challenge is that Template haskell
induces needing a ghc that can build libraries for *BOTH* host and target,
because we have arbitrary execution at Template Haskell time, right?

So does that mean fixing up GHC's architecture so that it can be built with
support for more than 1 target? (or at least running libs on *host* in GHCI
but otherwise compiling them for target? )

What would be needed in the restricted case of "We just want TH for our
cross compiler" rather than "general multi target goodness"?

Because If I squint, it sort of sounds like the cross compiler would need
to be Stage 2, and that the UNsound but simplest approach would then be to
take the various "libways", and produce both host and target variants as
appropriate (or that "build HOST Way" has to explicitly flagged).  I"m not
sure what implications this or another approach would have on all the
various build tooling needed etc etc.

This is me just  thinking out loud / trying to understand *why* and whats
needed, and how complex the work would be to do it well, or at least
decently in a way that *improves* (or doesn't complicate much more) the
associated parts that would need to be fixed up.


Basically: whats needed to make cross compiler  GHC first class haskell wrt
TH support? (I imagine that its not worth working on till the new TH work
lands / stabilizes, but id like to understand what work has to be done to
lead up to it).

(if I can figure out ways I can directly or indirectly support such work
happening, subject to having the time and/or resources over the next year,
i'd like to try and do so)

-Carter




On Thu, Jun 13, 2013 at 8:28 PM, Manuel M T Chakravarty <
chak at cse.unsw.edu.au> wrote:

> Carter,
>
> As you can imagine, I would be extremely happy about cross-compilation
> support for TH. However, I don't know of anybody working on it at the
> moment, unfortunately.
>
> Manuel
>
> Carter Schonwald <carter.schonwald at gmail.com>:
> > Hey All,
> > Whats the story planned for template haskell + cross compiler support
> come ghc 7.8?
> > I understand theres a lot of Template Haskell design underway, some of
> which will help support tools like Manuel's Inline-Objective-C work. Does
> this mean that factored out within this reorganization is a better story
> for cross compilation?
> >
> > Especially since one kill "app" for the Inline-Objective-C template
> haskell work would be writing IOS applications. Though I guess that also
> touches on the need to sort out supporting "FAT" ARM binaries too, right?
> >
> > This intersects with a few different large subsets of tickets, so i'm
> not sure if any single ticket is the right fora for this question.
> >
> > thanks!
> > -Carter
> > _______________________________________________
> > ghc-devs mailing list
> > ghc-devs at haskell.org
> > http://www.haskell.org/mailman/listinfo/ghc-devs
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.haskell.org/pipermail/ghc-devs/attachments/20130614/367a65de/attachment.htm>


More information about the ghc-devs mailing list