From: brogoff@speakeasy.net
To: Ocaml <caml-list@inria.fr>
Subject: Re: [Caml-list] What about polymorphic union types in functors?
Date: Fri, 6 Feb 2004 09:43:27 -0800 (PST) [thread overview]
Message-ID: <Pine.LNX.4.44.0402060935560.25801-100000@grace.speakeasy.net> (raw)
In-Reply-To: <4023B7FA.9080705@baretta.com>
On Fri, 6 Feb 2004, Alex Baretta wrote:
> Here what I need to do:
>
> module type FRAGMENT = sig
> type foo (* Closed polymorphic union type *)
> val do_something : foo -> whatever
> end
>
> module Merge_fragments (F1:FRAGMENT) (F2:FRAGMENT) : #FRAGMENT = struct
> type foo = [ F1.foo | F2.foo ]
> let do_something = function
> | #F1.foo as f1 -> F1.do_something f1
> | #F2.foo as f2 -> F2.do_something f2
> end
Looks like you are implementing GCaml style polymorphism by hand. Last I read,
work on GCaml was slated to resume after 3.07. The original system looked
quite promising, but I have no idea how it will interact with the module system,
and all of the other non corish extensions (OO, polymorphic variants, etc)
that make up the full language.
-- Brian
-------------------
To unsubscribe, mail caml-list-request@inria.fr Archives: http://caml.inria.fr
Bug reports: http://caml.inria.fr/bin/caml-bugs FAQ: http://caml.inria.fr/FAQ/
Beginner's list: http://groups.yahoo.com/group/ocaml_beginners
next prev parent reply other threads:[~2004-02-06 17:43 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2004-02-06 15:51 Alex Baretta
2004-02-06 17:43 ` brogoff [this message]
2004-02-06 18:58 ` Alex Baretta
2004-02-09 1:40 ` 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=Pine.LNX.4.44.0402060935560.25801-100000@grace.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