Decode this bug
Daniel Wang
danwang@cs.princeton.edu
10 Dec 1999 20:30:22 -0500
"Stephen Weeks" <sweeks@intertrust.com> writes:
> > Bug: reference to Cons741 not in scope
> >
> > uncaught exception Bug
> >
> > Here's the printed version of the Cps code. It looks like Cons741 is "in
> > scope" I'm not sure what to make of it... (this is the only reference to
> > Cons741 in the program...)
>
> I agree that Cons741 is in scope. The only thing I can think of
> offhand is that there are two different variables, both of which have
> the same print name. The stuff in atoms/id.fun is supposed to prevent
> this though.
Hmm.. the trace info wasn't that helpful.. however, I think, i might be
breaking things... I've been creating identifiers with the "fromString"
operator. I've been doing this because, my own IR already has it's own
notion or printable names... if I use "newString" they turn up as different
identifiers. However looking at the code for id.fun and knowing how my code
work i can see why...
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 ?
or do I not understand what's going on with the Ids?