[Haskell-cafe] Best way to build a GHC backend?

Jonathan Geddes geddes.jonathan at gmail.com
Sun Jul 8 07:02:02 CEST 2012

Venerable Haskell Hackers,

I love Haskell and think it should run everywhere. Now supposing I would
like to build another backend for GHC, perhaps for Java Bytecode, .Net CIL,
or JavaScript, What would be the best way to approach that? I can think of
a few options:

1. Produce External Core with -fext-core and compile that with a completely
separate compiler
2. Use the GHC apis to build a compiler that reuses a load of GHC's code,
but has it's own backend
3. Add a new backend directly into GHC

Any other options?

While I'm on the subject, why has Haskell not been ported to the likes of
the JVM, .NET CLR, or JavaScript? Are Haskell's non-strict semantics just
too different from the semantics of these other platforms?

SPJ is known for saying that Haskell's plan for world domination is support
for many parallelism/concurrency idioms. I believe running on many
platforms is just as important. From my point of view, languages that
cannot run on one of the 3 aforementioned platforms will become irrelevant.
(with the exception of C, of course).


--J Arthur
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.haskell.org/pipermail/haskell-cafe/attachments/20120707/2bae0304/attachment.htm>

More information about the Haskell-Cafe mailing list