[MLton] CML bug?

Lukasz S Ziarek lziarek@cs.purdue.edu
Wed, 24 Aug 2005 14:21:26 -0500


consider the following CML program (the mlb just has paths to the cml 
libraries):

*****
open RunCML
open CML

val _ = print("TEST - about to start CML\n")
val _ = RunCML.doit(fn () =>
  let val _ = print("TEST - CML started\n")
  in exit()
  end,  NONE)
*****

when compiled regularly

skavena 162 $ build/bin/mlton interSys.mlb
skavena 163 $

when compiled with -const 'Exn.keepHistory true'

skavena 161 $ build/bin/mlton -const 'Exn.keepHistory true' interSys.mlb
Type error: bad primapp
exp: Ref_assign (x_1, x_0)
val x_2 =
   Ref_assign (x_1, x_0)
let
   val x_3 =
      fn x_4 =>
      let
         val x_5 =
            "toplevel suffix not installed"
         val x_6 =
            MLton_bug (x_5)
..... (very long output - I can provide this if necessary)


I believe type error:bad primapp is being thrown in both case, just not 
reported in the first.  Please let me know if I can provide you with 
more information.  Basically, I would like to get exception history to 
work with CML, to help debug my other problem with interrupted system 
calls. This was compiled with the svn version of mlton checked out on 
aug 22nd.

thank you
Luke