Represetation of data, and structural equality

murthy@margaux
Mon, 14 Dec 1992 09:52:30 +0100 (MET)

Subject: Represetation of data, and structural equality
To: caml-redistribution@margaux
Date: Mon, 14 Dec 1992 09:52:30 +0100 (MET)

Dear Chet,

Your question canot be answered in a theoretic framework: it depends
on the compiler you use. In Caml V3.1 the answer is yes, in Caml Light
the answer is no:

> Caml Light version 0.5

#type foo = GOO of int;;
Type foo defined.
#let x = GOO 1;;
x : foo = GOO 1
#let y = GOO 1;;
y : foo = GOO 1
#x == y;;
- : bool = false
#
CAML (decstation) (V3.1) by INRIA Thu Oct 15

#type foo = GOO of int;;
Type foo is defined

#let x = GOO 1;;
Value x is (GOO 1) : foo

#let y = GOO 1;;
Value y is (GOO 1) : foo

#x == y;;
true : bool

Pierre Weis
----------------------------------------------------------------------------
Formel Project
INRIA, BP 105, F-78153 Le Chesnay Cedex (France)
E-mail: Pierre.Weis@inria.fr
Telephone: +33 1 39 63 55 98
----------------------------------------------------------------------------