[MLton-user] Re: generics library: getting started?

Vesa Karvonen vesa.a.j.k at gmail.com
Sun Mar 9 00:36:50 PST 2008


On Sun, Mar 9, 2008 at 8:01 AM, Dave Herman <dherman at ccs.neu.edu> wrote:
> I'm having trouble building the generics library.

Just to clarify, the generics library, being "pure SML", requires no
separate build step.  The Test scripts compile and run the test
program.

> I've got the latest svn of mlton and mltonlib, and I got this error:
>
>  % ./Test-mlton.sh
>  + which mlton
>  /c/mltonsrc/build/bin/mlton
>  + mkdir -p generated
>  ++ cd ../../../..
>  ++ pwd
>  + echo 'SML_COMPILER mlton
>  MLTON_LIB /c/mltonsrc/mltonlib'
>  + mlton -mlb-path-map generated/mlb-path-map -prefer-abs-paths true
>  -show-def-use generated/test.du -output generated/test test.mlb
>  Error: c:\mltonsrc\mltonlib\com\ssh\generic\unstable\test.mlb 54.0.
>    Parse error.
>  compilation aborted: parseAndElaborate reported errors

The output seems fine until the error.  The error message seems to
point to the last line.

>  Any suggestions? (Is there any other information I can provide to help
>  identify the issue?)

My first guess would be that this a Windows related issue.  Trouble
with locating files (/c/... vs c:\...) or maybe with newlines.

Can you try running the same script on a Linux machine?

Are you running this under Cygwin or MinGW?  Can you try the other?

Try binary searching the test.mlb file.  Comment out more and more
stuff from the bottom of the file to see if/when the error disappears.

I assume you have SML/NJ installed.  What happens when you run
./Test-smlnj.sh?  (Note that compiling the generics library with
SML/NJ may take a very long time to compile.  There are some
programming techniques used there (heavy use of Fold and functors)
that SML/NJ doesn't seem to like.)

-Vesa Karvonen



More information about the MLton-user mailing list