[MLton-user] opaque types and ffi

Stephen Weeks sweeks@sweeks.com
Sun, 23 Nov 2003 19:06:11 -0800


> It might be nice to have a "MLton.void32" (just kidding ;)) type that had
> no operations or ML inhabitants, but which was represented as a 32-bit
> word and could be used to encapsulate C pointers and passed to/from the
> FFI. I don't mind using SysWord.word within my FFI modules since I'm doing
> so much unsafe stuff anyway, but it is a little strange that I can xorb
> them!

I agree.  There is type MLton.pointer which does what you want, I
hope.  Unfortunately, due to an oversight, it does not work correctly
with experimental release 20031118, but it does work with our last
public release, 20030716, and will certainly work with our next one.