Most C libraries which use callback functions provide some means to pass a user-supplied pointer to the callback function. This could be used to invoke MLton functions from C code (passing the closure explicitly), even if these functions are not exported. How hard would that be to implement?