caml-list - the Caml user's mailing list
 help / color / mirror / Atom feed
* [Caml-list] Recursive record initialisation
@ 2018-04-16 20:57 Angelo Corsaro
  2018-04-16 21:07 ` Gabriel Scherer
  0 siblings, 1 reply; 2+ messages in thread
From: Angelo Corsaro @ 2018-04-16 20:57 UTC (permalink / raw)
  To: caml-list

[-- Attachment #1: Type: text/plain, Size: 899 bytes --]

Hello,

	I have a question concerning the initialisation of mutually recursive record types. As a trivial example consider the following type declaration:

type atype = { b : btype; }
and btype = { a : atype; }

This is a legal type declaration (it type-checks w/o a blink), but I can’t see how such a type would be initialised? As both “a" and “b” are values there is an apparent bootstrapping issue. But as this is a legal type declaration I guess there is a way around, wondering what the right way is.

Thanks very much in advance for any clarification.

—Angelo
 



—
“Simplicity is the ultimate sophistication." ~ Leonardo da Vinci


-- 
Caml-list mailing list.  Subscription management and archives:
https://sympa.inria.fr/sympa/arc/caml-list
Beginner's list: http://groups.yahoo.com/group/ocaml_beginners
Bug reports: http://caml.inria.fr/bin/caml-bugs

[-- Attachment #2: Type: text/html, Size: 2047 bytes --]

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

end of thread, other threads:[~2018-04-16 21:08 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-04-16 20:57 [Caml-list] Recursive record initialisation Angelo Corsaro
2018-04-16 21:07 ` Gabriel Scherer

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).