Recent Changes - Search:

Software

Wiki Docs

BuildingGuide

LambdaVM has only been tested with ghc-6.6 on Darwin/ppc and Linux/x86 although it should be just as portable as GHC itself.

Obtain and install the hsutils and hsjava libraries required by the modified GHC. These packages can be built and installed using Cabal or the makefile provided.

 $ darcs get http://darcs.brianweb.net/hsutils
 $ make -C hsutils build register
 $ darcs get http://darcs.brianweb.net/hsjava
 $ make -C hsjava build register

Obtain the modified GHC and associated libraries

 $ darcs get --partial http://darcs.brianweb.net/ghc
 $ cd ghc
 $ chmod +x darcs-all
 $ ./darcs-all get

Configure the modified GHC. Note the build.mk step isn't required but it disables some stuff that significantly slows down the build process. For more information see the GHC Building Guide

 $ autoreconf
 $ ./configure --enable-java
 $ cat > mk/build.mk
 GhcStage1HcOpts = -O0
 GhcLibWays      = j
 SplitObjs       = NO
 ^D

Compile the modified GHC. Stage 1 will build the compiler, rts, and base libraries. Later stages simply rebuild the compiler with itself which we don't need.

$ make stage1

Test the compiler

 $ cat > Main.hs                               
 main = print (product [1..10])
 ^D
 $ ./compiler/ghc-inplace -java Main.hs
 $ java -cp rts/HSrts.jar:libraries/base/HSbase.jar:. Main

Note: you will have to manually tell the java command where to find the jars for all the packages you use. Unfortunately there is no portable way to bake this information into the class.

Note: You probably do not want to use this version of GHC as your primary Haskell compiler. It is based off GHC HEAD which isn't stable to begin with and I've made a few non-java related changes to the compiler that aren't well tested. In fact, as of this writing LambdaVM cannot even recompile itself (even when generating native code)

Edit - History - Print - Recent Changes - Search
Page last modified on October 30, 2007, at 04:54 PM EDT