#endif
, unsafePtrEq
+
+ , freeHaskellFunctionPtr
) where
import PrelHandle
import PrelErr
import IO ( hPutStr, hPutChar )
+import PrelAddr ( Addr )
#endif
import Ix
#endif
\end{code}
+When using 'foreign export dynamic' to dress up a Haskell
+IO action to look like a C function pointer, a little bit
+of memory is allocated (along with a stable pointer to
+the Haskell IO action). When done with the C function
+pointer, you'll need to call @freeHaskellFunctionPtr()@ to
+let go of these resources - here's the Haskell wrapper for
+that RTS entry point, should you want to free it from
+within Haskell.
+
+\begin{code}
+foreign import ccall "freeHaskellFunctionPtr"
+ freeHaskellFunctionPtr :: Addr -> IO ()
+
+\end{code}
+