From: boos@arthur.u-strasbg.fr
To: caml-list@inria.fr
Cc: luther@dpt-info.u-strasbg.fr, LUTHERSV@e-i.com
Subject: Re: Types construits et interface de modules
Date: Thu, 20 Aug 1998 08:17:20 +0200 (CEST) [thread overview]
Message-ID: <13787.48117.777687.277334@arthur.u-strasbg.fr> (raw)
In-Reply-To: <35DA8DDB.4BBB1E59@e-i.com>
Salut Sven,
Ton truc ne marche évidemment pas en O'Caml, les constructeurs ne sont
pas du tout des valeurs fonctionnelles (comme ils le sont en SML).
Par contre, une
fonctionnalité assez proche de ce que tu recherches existe dans
O'Labl : les variants polymorphes.
Ca fait longtemps que je n'ai plus touché à O'Labl, donc je
te dis ca de tête :
module type T = sig
type t = [ `A | `B ]
end
module A = struct
type t = [ `A | `B ]
end
module B = struct
type t = [ `A | `B | `C ]
end
module F (M:T) = struct
type t = M.t
end
module MA = F (A)
module MB = F (B)
[English: what Sven asked for in his mail is probably Jacques Garrigue
's "Polymorphic Variants" (in O'Labl) ]
-- Christian
(qui découvre avec bonheur O'Caml-2 : félicitations tout le monde !)
next prev parent reply other threads:[~1998-08-24 13:07 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
1998-08-19 8:33 Sven LUTHER
1998-08-20 6:17 ` boos [this message]
1998-08-31 9:47 ` Xavier Leroy
1998-08-31 10:05 LUTHER Sven
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=13787.48117.777687.277334@arthur.u-strasbg.fr \
--to=boos@arthur.u-strasbg.fr \
--cc=LUTHERSV@e-i.com \
--cc=caml-list@inria.fr \
--cc=luther@dpt-info.u-strasbg.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