caml-list - the Caml user's mailing list
 help / color / mirror / Atom feed
* Bug in equality testing?
@ 1994-03-20 15:24 John Harrison
  1994-03-21 16:36 ` Vale'rie Me'nissier-Morain
  1994-03-21 23:46 ` Xavier Leroy
  0 siblings, 2 replies; 3+ messages in thread
From: John Harrison @ 1994-03-20 15:24 UTC (permalink / raw)
  To: caml-list; +Cc: John.Harrison


Hi,

I've come across the following, which unless I am being stupid
looks like a bug. The program below produces (in 0.6):

  true; true; false

John.

P.S. Thanks for the interesting replies on hash-consing. I'm afraid
I am likely to be pestering you with more questions about CAML soon.
It's a great system!

**********************************************
type Example = Var of string            
             | App of string *  Example list;;

let DEST = 
  fun (App p) -> p 
    | (Var _) -> failwith "DEST";;
          
let a = DEST(App("X",([]: Example list)));;
let b = ("X",([]: Example list));;
 
fst(a) = fst(b);;
snd(a) = snd(b);;
a = b;; 
**********************************************




^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~1994-03-22 10:16 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
1994-03-20 15:24 Bug in equality testing? John Harrison
1994-03-21 16:36 ` Vale'rie Me'nissier-Morain
1994-03-21 23:46 ` Xavier Leroy

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).