From: Serge Leblanc <serge.leblanc@orange.fr>
To: Nicolas Pouillard <nicolas.pouillard@gmail.com>
Cc: caml-list <caml-list@yquem.inria.fr>
Subject: Re: [Caml-list] revised syntax for abstract types ?
Date: Thu, 10 Dec 2009 19:10:28 +0100 [thread overview]
Message-ID: <1260468628.22959.510.camel@serge2.localnet> (raw)
In-Reply-To: <1260452934-sup-6342@peray>
[-- Attachment #1.1: Type: text/plain, Size: 1024 bytes --]
On Thu, 2009-12-10 at 14:49 +0100, Nicolas Pouillard wrote:
> Excerpts from Serge Leblanc's message of Thu Dec 10 12:56:44 +0100 2009:
> > Hi, the documentation for the revised syntax explain that abstract types
> > are expressed by :
>
> The documentation is too old, abstract types now have the same syntax in
> revised than in the original OCaml syntax.
>
In the following types definitions,
type trie 'a = [ Trie of arcs 'a ]
and arcs 'a = list ('a * trie 'a);
type zipper 'a = [ Top | Zip of (arcs 'a * 'a * arcs 'a * zipper 'a) ]
and edit_state 'a = (zipper 'a * trie 'a);
why is it not possible to describe them thus ?
type letter = 'a;
type trie = [ Trie of arcs ]
and arcs = list (letter * trie);
type zipper = [ Top | Zip of (arcs * letter * arcs * zipper) ]
and edit_state = (zipper * trie);
Thanks for your help.
--
Serge Leblanc
gpg --keyserver hkp://keyserver.ubuntu.com:11371 --recv-keys 0x33243C1B
Fingerprint = 066C 005F 5595 D85C 7673 D969 1DD4 90C4 3324 3C1B
[-- Attachment #1.2: Type: text/html, Size: 2748 bytes --]
[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 197 bytes --]
next prev parent reply other threads:[~2009-12-10 18:10 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-12-10 11:56 Serge Leblanc
2009-12-10 13:49 ` [Caml-list] " Nicolas Pouillard
2009-12-10 14:29 ` Stefano Zacchiroli
2009-12-10 18:10 ` Serge Leblanc [this message]
2009-12-11 0:14 ` Jacques Garrigue
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=1260468628.22959.510.camel@serge2.localnet \
--to=serge.leblanc@orange.fr \
--cc=caml-list@yquem.inria.fr \
--cc=nicolas.pouillard@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