Why are strings linked lists?

Alastair Reid alastair at reid-consulting-uk.ltd.uk
Wed Dec 10 18:30:23 EST 2003


> Wouldn't it be good to implement an LVM import/export feature in GHC, Hugs
> and nhc98?

To read and write lvm bytecodes?

That could be quite a lot of work because the bytecodes are specific to the 
abstract machine and the abstract machines are different.  Unless the LVM is 
essentially just a G-machine (I suspect it isn't), generating LVM code in 
Hugs would require a new code generator.  Reading LVM code is potentially 
even harder.  IMO, the right way to do this is to read/write 'core' lambda 
calculus like the code GHC uses as its intermediate form.

Having found a way to import/export code, there is a second problem to be 
overcome.  Different compilers have different sets of primitive operations.  
I'm sure they all have the same arithmetic operations and, of course, they 
differ in whether or not they have concurrency operations but there are big 
differences in their implementation of the IO monad and exceptions, their 
array operations, etc.

--
Alastair Reid   www.haskell-consulting.com



More information about the Haskell mailing list