[MLton] Callback to function pointer?

Matthew Fluet fluet@cs.cornell.edu
Tue, 12 Jul 2005 08:16:54 -0400 (EDT)


> MLton can already call methods by function pointer, but it cannot export
> methods _to_ function pointer. Would this be difficult? Many C libraries
> (especially GUIs and event libraries) use callbacks to C function pointers.

Why do you think that MLton cannot export functions that may be called 
indirectly?  An "_export"-ed function is a legitimate C function in the 
object file.  If you want a function pointer to that function, take its 
address with "&".