From: yoann padioleau <padator@wanadoo.fr>
To: Markus Mottl <markus.mottl@gmail.com>
Cc: Caml-list List <caml-list@inria.fr>
Subject: Re: [Caml-list] typing problem with sexplib and mutually recursive polymorphic types
Date: Wed, 11 Mar 2009 07:11:18 +0100 (CET) [thread overview]
Message-ID: <21952156.346634.1236751878001.JavaMail.www@wwinf1b03> (raw)
In-Reply-To: <f8560b80903102125h784906d3ged83273e5cf523b0@mail.gmail.com>
>
> This has to do with recursive type definitions, not with generating
> closures with _loc. The following is similar and does not compile
> either:
>
> let rec foo () = []
> and bar () = "asdf" :: foo ()
> and bla () = 42 :: foo ()
>
> These definitions are clearly sound, but the type checker doesn't get
> it. Note, however, that the following works:
>
> let foo () = []
> let rec bar () = "asdf" :: foo ()
> and bla () = 42 :: foo ()
>
> You can apply the same trick in your specific example by simply moving
> the type definition of x1 out of the cycle with x2 and x3.
Yes on this example, but what if I can't move it out because
the types really need to be mutually recursive ?
>
> Cheers,
> Markus
>
> --
> Markus Mottl http://www.ocaml.info markus.mottl@gmail.com
>
>
next prev parent reply other threads:[~2009-03-11 6:11 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-03-11 2:45 Yoann Padioleau
2009-03-11 4:25 ` [Caml-list] " Markus Mottl
2009-03-11 6:11 ` yoann padioleau [this message]
2009-03-11 14:20 ` Markus Mottl
2009-03-11 14:32 ` Yitzhak Mandelbaum
2009-03-11 14:44 ` Markus Mottl
2009-03-11 16:16 ` Damien Doligez
2009-03-11 16:43 ` Markus Mottl
2009-03-11 19:03 ` Till Varoquaux
2009-03-12 1:42 ` Jacques Garrigue
2009-03-11 23:08 ` Yoann Padioleau
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=21952156.346634.1236751878001.JavaMail.www@wwinf1b03 \
--to=padator@wanadoo.fr \
--cc=caml-list@inria.fr \
--cc=markus.mottl@gmail.com \
/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