caml-list - the Caml user's mailing list
 help / color / mirror / Atom feed
From: John Harrison <John.Harrison@cl.cam.ac.uk>
To: caml-list@pauillac.inria.fr
Cc: John.Harrison@cl.cam.ac.uk
Subject: Bug in equality testing?
Date: Sun, 20 Mar 94 15:24:23 +0000	[thread overview]
Message-ID: <"swan.cl.cam.:202150:940320152434"@cl.cam.ac.uk> (raw)


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;; 
**********************************************




             reply	other threads:[~1994-03-21 16:16 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
1994-03-20 15:24 John Harrison [this message]
1994-03-21 16:36 ` Vale'rie Me'nissier-Morain
1994-03-21 23:46 ` Xavier Leroy

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='"swan.cl.cam.:202150:940320152434"@cl.cam.ac.uk' \
    --to=john.harrison@cl.cam.ac.uk \
    --cc=caml-list@pauillac.inria.fr \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).