Decode this bug
Stephen Weeks
sweeks@intertrust.com
Fri, 10 Dec 1999 19:00:36 -0800 (PST)
> should
> val x = Id.newString "foo"
> val y = Id.newString "foo"
>
> Id.equals(x,y) --> true ?
>
> val x = Id.fromString "foo"
> val y = Id.fromString "foo"
>
> Id.equals(x,y) --> true ?
No. Both of these should return false. Newly created identifiers
always have a ref cell in them that uniquely identifies them
(actually, it is the property list for the identifier). The different
constructors (fromString, new, newString, newNoname) all build new
identifiers that are unequal to any other -- the only difference is in
the print name of the variable.
> Does MLton expect each variable to be defined exactly once? (i.e. to I need
> to alpha convert my program before hand..)
Yes. Every label, variable, etc. must be defined in exactly one
place. This is so that the property lists can be used.
> inferHandlers ==>
> ==>
> Bug: fold2
>
> uncaught exception Bug
This is the handler inference pass. The type system must be able to
assign a unique local handler stack to each local jump.