From: Andreas Rossberg <rossberg@ps.uni-sb.de>
To: caml-list@inria.fr
Subject: Re: Phantom types (very long) (Was Re: [Caml-list] opaque polymorphism)
Date: Tue, 11 Sep 2001 11:44:27 +0200 [thread overview]
Message-ID: <3B9DDCFB.384A3748@ps.uni-sb.de> (raw)
In-Reply-To: <20010910154559.O6031-100000@shell5.ba.best.com>
Brian Rogoff wrote:
>
> The final example is familiar to anyone who reads comp.lang.ml, where I
> mistakenly asserted that you couldn't have statically typed array
> dimensions in ML like you can in C++ or Ada. Matthias Blume then posted
> a solution which works (though it reminds me a bit of that proverb of the
> dancing bear).
Actually, Matthias gave a very interesting talk on the Babel workshop in
Florence last Saturday where he showed how to encode the complete C type
system in ML (including functions, pointers, constness, bitfields, and
all dark corners - the only bit still missing is varargs), using even
more phantom type trickery. Unfortunately, the paper is not yet
available online, but as his work is part of the new FFI of SML/NJ you
can read about the encoding in its documentation (inside the
ml-nlffi-lib.tgz of the latest working version).
Cheers,
- Andreas
--
Andreas Rossberg, rossberg@ps.uni-sb.de
"Computer games don't affect kids; I mean if Pac Man affected us
as kids, we would all be running around in darkened rooms, munching
magic pills, and listening to repetitive electronic music."
- Kristian Wilson, Nintendo Inc.
-------------------
Bug reports: http://caml.inria.fr/bin/caml-bugs FAQ: http://caml.inria.fr/FAQ/
To unsubscribe, mail caml-list-request@inria.fr Archives: http://caml.inria.fr
next prev parent reply other threads:[~2001-09-11 9:44 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2001-09-07 18:35 [Caml-list] opaque polymorphism Charles Martin
2001-09-10 7:02 ` Francois Pottier
2001-09-10 23:19 ` Phantom types (very long) (Was Re: [Caml-list] opaque polymorphism) Brian Rogoff
2001-09-11 9:44 ` Andreas Rossberg [this message]
2001-09-11 18:38 ` [Caml-list] Re: Phantom types (very long) j h woodyatt
2001-09-11 19:16 ` Brian Rogoff
2001-09-12 9:33 ` Daan Leijen
2001-09-14 8:49 ` Jacques Garrigue
2001-09-14 19:10 ` Brian Rogoff
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=3B9DDCFB.384A3748@ps.uni-sb.de \
--to=rossberg@ps.uni-sb.de \
--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