From: "Ryan Tarpine" <rtarpine@hotmail.com>
To: caml-list@inria.fr
Subject: Re: [Caml-list] Type variables won't generalize
Date: Thu, 04 Apr 2002 14:53:12 -0500 [thread overview]
Message-ID: <F219a0joe0dF7NmdAPs0000caf6@hotmail.com> (raw)
>From: Remi VANICAT <vanicat@labri.u-bordeaux.fr>
>To: caml-list@inria.fr
>Subject: Re: [Caml-list] Type variables won't generalize
>Date: 04 Apr 2002 14:04:16 +0200
>
>...
>
>If you already know the types you can put in this field, you can use a
>new variant type :
>
>type multi =
>| Float of float
>| Int of int
>| Int2float of int -> float
>
>...
>
The problem is that I can't be sure of which types could be stored there.
This record is meant to implement an object for an object-oriented language
I'm trying to write. The problem field stores primitives like ints and
floats for Integer and Float classes, but in the case that later on I would
like to add new primitives like Num.num through extension modules (e.g., not
by modifying and recompiling the entire language) a normal variant won't
work. I unfortunately am having problems with typechecking when using
polymorphic variants, so for now I am just going to use normal variants.
Thanks,
Ryan Tarpine, rtarpine@hotmail.com
"To err is human, to compute divine. Trust your computer but not its
programmer."
- Morris Kingston
Ryan Tarpine, rtarpine@hotmail.com
"To err is human, to compute divine. Trust your computer but not its
programmer."
- Morris Kingston
_________________________________________________________________
MSN Photos is the easiest way to share and print your photos:
http://photos.msn.com/support/worldwide.aspx
-------------------
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 reply other threads:[~2002-04-04 19:53 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2002-04-04 19:53 Ryan Tarpine [this message]
-- strict thread matches above, loose matches on Subject: below --
2002-04-04 12:19 Ryan Tarpine
2002-04-04 12:04 ` Remi VANICAT
2002-04-04 12:58 ` Jacques Garrigue
2002-04-04 1:37 Ryan Tarpine
2002-04-04 7:36 ` Francois Pottier
2002-04-03 22:21 Ryan Tarpine
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=F219a0joe0dF7NmdAPs0000caf6@hotmail.com \
--to=rtarpine@hotmail.com \
--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