[MLton-user] Lack of information with -const 'Exn.keepHistory true'

Matthew Fluet fluet at tti-c.org
Wed Jan 24 05:21:43 PST 2007


> But it still does not provide a location in my own code which could make it
> easier to identify the path to the error. As a consequence, I'll need to
> instrument my code in order to identify the appropriate location.

Yes, the exception history mechanism seems to have some issues with 
shallow call stacks.  For example, the following program produces no 
history:

fun doit () = raise Subscript
val () = doit ()

However, the following does:

fun doit n = if n = 0 then raise Subscript else doit (n - 1)
val () = doit 1

> I'm just trying to find an appropriate set of options I could use while
> debugging in order to get as many information as possible in order to
> identify the full path to a particular error.

I don't believe that there is any more that you can get out of the 
current version of the compiler.





More information about the MLton-user mailing list