import Control.Monad ( sequence_ )
import Foreign.Storable
+import Data.Typeable
import GHC.Show
import GHC.List ( null )
import GHC.Ptr ( Ptr(..), FunPtr )
import GHC.Err
+#include "Typeable.h"
+
-- |The type 'ForeignPtr' represents references to objects that are
-- maintained in a foreign language, i.e., that are not part of the
-- data structures usually managed by the Haskell storage manager.
-- object, because that ensures that whatever the finalizer is
-- attached to is kept alive.
+INSTANCE_TYPEABLE1(ForeignPtr,foreignPtrTc,"ForeignPtr")
+
data ForeignPtrContents
= PlainForeignPtr !(IORef [IO ()])
| MallocPtr (MutableByteArray# RealWorld) !(IORef [IO ()])