Swap imports around to get GHC.ForeignPtr out of the base knot
[ghc-base.git] / GHC / ForeignPtr.hs
index 64f763a..e043e09 100644 (file)
@@ -35,6 +35,7 @@ module GHC.ForeignPtr
 
 import Control.Monad    ( sequence_ )
 import Foreign.Storable
+import Data.Typeable
 
 import GHC.Show
 import GHC.List         ( null )
@@ -44,6 +45,8 @@ import GHC.STRef        ( STRef(..) )
 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.
@@ -71,6 +74,8 @@ data ForeignPtr a = ForeignPtr Addr# ForeignPtrContents
         -- 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 ()])