Porting fxp to MLton

Wesley W. Terpstra has contributed a port of fxp 2.0 to MLton.
  1. Download fxp-2.0;
  2. Unpack the sources, and change to the fxp directory:
  3.     gunzip -c fxp-2.0.tar.gz | tar xf -
        cd fxp-2.0
  4. You need to do some modifications in the fxp's sources for compatibility with MLton.

    For fxp 2.0 put the following patch mlton.diff in the fxp-2.0 directory and type:

        patch -p1 < mlton.diff
        

    Alternatively you can perform the required changes by hand:

    1. Conformance to the 2002 version of the SML Basis Library
      • there is no Array.extract
      • there is no 'gc' in Timer.checkCPUTimer
      • there is no Substring.full
      • only unit expressions should be sequenced
      • {Array/Vector}.{fold/app}* do not take slices
    2. adding .mlb files to describe the project
      • similar to .cm
      • must be ordered by dependency
    3. adding a startup hook to the programs
  5. Compile the applications. For example, the parser by typing:
         mlton src/Apps/Null/null.mlb
         
  6. You can run the parser by typing:
         src/Apps/Null/null yourInput.xml