From: Claudio Sacerdoti Coen <sacerdot@cs.unibo.it>
To: Florian Hars <hars@bik-gmbh.de>
Cc: caml-list@inria.fr
Subject: Re: [Caml-list] Getting rid of impossible polymorphic variant tags from infered types
Date: Wed, 3 Mar 2004 11:40:25 +0100 [thread overview]
Message-ID: <20040303104025.GA23634@cs.unibo.it> (raw)
In-Reply-To: <4045B30F.9000603@bik-gmbh.de>
> But this gives me the worst of both worlds, no?
It is a bit heavyweight, but not too bad.
> I have to define a function
> f_r for every type I might want to use in place of foo,
Wasn't it your goal to define f_r in the first place?
> *and* the type checker can still see the `Fnord that isn't there:
You are right here. Indeed, you should define your own case-analysis
operator (whose principal argument would have type [> `NoFnord] foo)
and use it in place of the match ... with.
Withouth proper syntax sugar the code becomes clumsy.
This is a drawback of phantom types.
> So the "| #foo_flat as v -> v :: init" version seems to be the only
> workable solution.
Regards,
C.S.C.
--
----------------------------------------------------------------
Real name: Claudio Sacerdoti Coen
PhD Student in Computer Science at University of Bologna
E-mail: sacerdot@cs.unibo.it
http://www.cs.unibo.it/~sacerdot
----------------------------------------------------------------
-------------------
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
prev parent reply other threads:[~2004-03-03 10:40 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2004-03-01 15:09 Florian Hars
2004-03-01 16:35 ` Claudio Sacerdoti Coen
2004-03-03 10:27 ` Florian Hars
2004-03-03 10:40 ` Claudio Sacerdoti Coen [this message]
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=20040303104025.GA23634@cs.unibo.it \
--to=sacerdot@cs.unibo.it \
--cc=caml-list@inria.fr \
--cc=hars@bik-gmbh.de \
/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