[nhc-users] Re: porting nhc98

Malcolm Wallace Malcolm.Wallace@cs.york.ac.uk
Fri, 1 Jun 2001 11:51:43 +0100


> I am writing to ask about ports or porting of a Haskell compiler to
> machines that have C int's (and unsigned) that are bigger than 32 bits.
> My employer produces several CPU types where the C compiler has
> type int that is bigger than 32 bits (e.g. 46 or 64 bits). This
> breaks several assumptions that are deeply embedded in various
> Haskell compilers and runtime systems.

> Do you know anyone who is thinking about removing this assumption
> from from the Haskell compilers and runtime systems? How hard would
> it be for me to produce a 64 bit version of nhc98? Would I be better
> off trying another compiler (my first impression is nhc98 might be
> the easiest to port and to convert to a cross-compiler)? And who is
> the best person to talk to about massively parallel implementation
> of Haskell?

> regards
> Robert (Bob) Buckley
> Senior Systems Engineer
> Cray Australia Pty Ltd

Dear Bob,

I have long wanted to port nhc98 to a 64-bit architecture, but as
always it is difficult to find the time alongside my real research
tasks.  There are publically available compute-farms of Alpha and
Itanium servers on the net which can be used for porting and testing
software, and I intend to try this avenue when I can.  At one time,
an earlier version of the nhc compiler did run happily on an Alpha
processor, but since that time (five or more years ago), there have
been quite a few additions to the compiler and runtime system that have
not taken care to be word-size independent.  Because these additions
are distributed in many places around the system, I guess it would be
hard for someone who does not already know the system to find them all.
Nhc98's internal documentation is unfortunately very sparse.

But although nhc98 is currently fixed to a 32-bit architecture,
I believe that the ghc compiler already works just fine on 64-bit
Sparc and Alpha machines.  However you are right that, even so, it
may be quite some work to port ghc to a new machine architecture.
Ghc needs, at the very least, some help to understand the assembly
language format (because ghc `mangles' assembly code textually to
achieve better performance when compiling via C), and rather more
help if you decide to go the native code route.

Ghc does have the advantage of documentation to help those attempting
a port, and Simon Marlow can help you further if you get stuck.

Finally, regarding parallel implementations of Haskell, the best
people to ask are:

    Kevin Hammond       (does parallel Haskell experiments on a
                         Beowulf cluster)
    Hans-Wolfgang Loidl (main current implementer of GpH -
                         Glasgow parallel Haskell)
    Rita Loogen         (develops Eden, another parallel system based
                         on Haskell)
    Simon Peyton Jones  (ghc supremo, has worked on the GRIP parallel
                         Haskell machine in the past)

All of them can be found from the "people" page on haskell.org.

Regards,
    Malcolm