Open GoogleCodeExporter opened 9 years ago
Here is a demo of how it is wrong:
prompt> let c = freshen b
...
prompt> let d = freshen b
...
prompt> (let ([c1;_],_)=c in let ([d1;_],_)=d in symbolEq c1 d1)
False : Bool
'c' and 'd' should be indistinguishable in a referentially transparent system.
For this I did not use any illegal tricks such as 'show'.
Btw. the 'Atom' family is IO-based and provides the similar functionality:
freshAtom : forall (a:*1) (b:a:*1).IO (Atom b)
sameAtom : forall (a:*1) (b:a:*1) (c:a:*1).Atom b -> Atom c -> IO (Equal b c)
swapAtom : forall (a:*1) (b:a:*1) (c:a:*1) d.Atom b -> Atom c -> d -> d
Original comment by ggr...@gmail.com
on 20 Jan 2011 at 6:09
Original issue reported on code.google.com by
ggr...@gmail.com
on 7 Dec 2010 at 12:10