Volker Stolz wrote: > [...] > class ToPtr a where > toPtr :: a -> Ptr b > [...]
The problem with a class like this is that you can't define any sensible instances, apart from the trivial one for Ptr itself. There is no guarantee at all that e.g. a FunPtr, an Int, ... fits into a Ptr and there are actually platforms where this is not the case. It's perhaps OK as a hack, but it has no place in a general FFI library, Cheers, S. _______________________________________________ FFI mailing list [EMAIL PROTECTED] http://www.haskell.org/mailman/listinfo/ffi