[MLton] deepFlatten exception

Matthew Fluet fluet@cs.cornell.edu
Tue, 13 Jun 2006 11:39:29 -0400 (EDT)


> While compiling a program using the command
>
> mlton -verbose 3 -runtime 'ram-slop 0.4' t.mlb
>
> quite a bit of output is produced (see attached log file) with this at the 
> end:
>
>           deepFlatten starting
>           deepFlatten raised in 0.11 + 0.00 (0% GC)
>        ssa2Simplify raised in 0.35 + 0.00 (0% GC)
>     pre codegen raised in 28.94 + 5.17 (15% GC)
>  Compile SML raised in 28.94 + 5.17 (15% GC)
> MLton raised in 28.94 + 5.17 (15% GC)
> DeepFlatten.replaceVar x_0
>
> Is this a compiler bug, or something wrong with my program?

It is a compiler bug.  Any errors after the parseAndElaborate (i.e., SML 
type-checking) phase are indicative of compiler bugs.  (It might be a good 
idea for us to change the exception printer to explicitly state that the 
error should be reported to mlton@mlton.org as a compiler bug.)

> It compiles fine with Moscow ML. I've attached the t.mlb file to this 
> email, but the t.sml program file is 608Kb, so I've put that up on my 
> website at
>
> http://www.cl.cam.ac.uk/users/jeh1004/t.sml

You can also use  http://mlton.org/TemporaryUpload  as a place to post 
files that are too large for the mailing list.

> I'm using the very latest version of MLton. I ran into this problem
> with a version I'd built a year ago, so today I did a cvs update and
> built the very latest version, with exactly the same results.

Indeed, the bug appears in my latest version.  (BTW, MLton is now using 
subversion for revision control; see http://mlton.org/Sources.  The old 
cvs repository is still accessible, but has been frozen for nearly a 
year.)

Thanks for the report; we'll look into it.