caml-list - the Caml user's mailing list
 help / color / mirror / Atom feed
From: brogoff <brogoff@speakeasy.net>
To: caml-list <caml-list@inria.fr>
Subject: Re: [Caml-list] cyclic types
Date: Sat, 29 Jan 2005 09:12:59 -0800 (PST)	[thread overview]
Message-ID: <Pine.LNX.4.58.0501290905300.12148@shell3.speakeasy.net> (raw)
In-Reply-To: <6b8a914205012905427c79cd85@mail.gmail.com>

On Sat, 29 Jan 2005, Remi Vanicat wrote:
> On Sat, 29 Jan 2005 14:15:43 +0200, Radu Grigore <radugrigore@gmail.com> wrote:
> > Why are cyclic types forbidden?
> >
> > I was forced to use the definition:
> >   type forest = Forest of forest StringMap.t | Empty
> > where I would have rather used
> >   type forest = forest StringMap.t
> > The error is:
> >   The type abbreviation tree is cyclic
>
> You can use the -rectypes of the ocaml compiler or toplevel to allow
> cyclic type.

This comes up relatively frequently, and it is known that having -rectypes
as the default is not a good idea. However, wouldn't explicit typing of
this case sidestep the known problems and eliminate the need for a
-rectypes option here?

-- Brian


  reply	other threads:[~2005-01-29 17:13 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-01-29 12:15 Radu Grigore
2005-01-29 12:34 ` Radu Grigore
2005-01-29 13:42 ` [Caml-list] " Remi Vanicat
2005-01-29 17:12   ` brogoff [this message]
2005-01-29 17:33     ` Radu Grigore
2005-01-29 23:47       ` Damien Doligez
2005-01-30  5:56         ` brogoff
2005-01-30  6:05         ` Radu Grigore
2005-01-30  7:19           ` William Lovas
2005-01-30 10:33       ` Xavier Leroy
2005-01-30 11:44         ` sejourne_kevin
2005-02-01  9:27         ` Christophe Raffalli
2005-01-29 21:02     ` skaller
2005-01-30  6:46       ` brogoff

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=Pine.LNX.4.58.0501290905300.12148@shell3.speakeasy.net \
    --to=brogoff@speakeasy.net \
    --cc=caml-list@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).