Version française
Home     About     Download     Resources     Contact us    

This site is updated infrequently. For up-to-date information, please visit the new OCaml website at

Browse thread
[Caml-list] opaque polymorphism
[ Home ] [ Index: by date | by threads ]
[ Search: ]

[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
Date: 2001-09-11 (09:44)
From: Andreas Rossberg <rossberg@p...>
Subject: Re: Phantom types (very long) (Was Re: [Caml-list] opaque polymorphism)
Brian Rogoff wrote:
> The final example is familiar to anyone who reads, 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).


	- Andreas

Andreas Rossberg,

"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:  FAQ:
To unsubscribe, mail  Archives: