[Haskell-cafe] External representation of GHC bytecode
Sean Seefried
sean.seefried at gmail.com
Tue Dec 9 04:41:09 UTC 2014
Friends,
I'd like to ask a possible quite ignorant question. Can GHC produce an
external representation of GHC byte code, and load that byte code back up?
If it's just an internal representation is there any good reason for this?
It seems to me that this would be useful for at least a few reasons:
1. This could solve the Template Haskell on cross compiler's dilemma.
Currently, the problem is that a cross compiler will produce object code
for the target machine which cannot be run on the host machine. But if this
were bytecode the problem would be trivial to solve.
2. You could transmit Haskell programs over the network to run on arbitrary
machines.
3. As it stands GHC sometimes has long standing bugs where it produces
incorrect machine code on some architectures for various (fairly boring)
reasons. Interpreting bytecode might be less efficient but would at least
ensure that you could, in principle, run GHC on a variety of different
platforms until these bugs are finally squashed.
Sean
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.haskell.org/pipermail/haskell-cafe/attachments/20141209/8712816a/attachment.html>
More information about the Haskell-Cafe
mailing list