* Represetation of data, and structural equality
@ 1992-12-14 8:47 murthy
0 siblings, 0 replies; 2+ messages in thread
From: murthy @ 1992-12-14 8:47 UTC (permalink / raw)
To: caml-list
If I define a type,
type foo = GOO of int;;
will it be implemented as an unboxed integer?
Thanks,
--chet--
^ permalink raw reply [flat|nested] 2+ messages in thread
* Represetation of data, and structural equality
@ 1992-12-14 8:52
0 siblings, 0 replies; 2+ messages in thread
From: @ 1992-12-14 8:52 UTC (permalink / raw)
To: caml-redistribution
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
----------------------------------------------------------------------------
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~1992-12-14 8:52 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
1992-12-14 8:47 Represetation of data, and structural equality murthy
1992-12-14 8:52
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox