[MLton-user] opaque types and ffi
Vesa A Norrman
Tue, 25 Nov 2003 16:50:15 +0200 (EET)
> Taking the idea a bit further, perhaps it would be nice to have the type
> be 'a pointer, with FFI allowed for any 'a. This would allow the
> programmer to create any number of distinct pointer types with "phantom"
> arguments (if I recall correctly this idiom is used all over in mlton
> itself). This might be a way to do what Vesa wants.
What I was thinking was probably something like:
structure Voidp :> VOIDP
where type t may pass through ffi
type t = Word32.word
Obviously this is not possible...
About practical matters, I did not know about MLton.pointer.
Is an ffi call required for testing for null pointer? Vesa