X-Git-Url: http://git.megacz.com/?a=blobdiff_plain;f=GHC%2FForeignPtr.hs;h=ee95828cabe759f974fd3d11b60265f40176e12d;hb=7659d3c9c7c6dc87d3d2be1391f123c15553a1a4;hp=a418efcede20ac8e43f440a98b562ef3941c8518;hpb=bd1dd538e62a728e3cd37132e7393cee8b051cf9;p=ghc-base.git diff --git a/GHC/ForeignPtr.hs b/GHC/ForeignPtr.hs index a418efc..ee95828 100644 --- a/GHC/ForeignPtr.hs +++ b/GHC/ForeignPtr.hs @@ -1,4 +1,4 @@ -{-# OPTIONS -fno-implicit-prelude #-} +{-# OPTIONS_GHC -fno-implicit-prelude #-} ----------------------------------------------------------------------------- -- | -- Module : GHC.ForeignPtr @@ -13,6 +13,7 @@ -- ----------------------------------------------------------------------------- +-- #hide module GHC.ForeignPtr ( ForeignPtr(..), @@ -32,7 +33,6 @@ module GHC.ForeignPtr import Control.Monad ( sequence_ ) import Foreign.Ptr import Foreign.Storable -import Data.Typeable import GHC.List ( null ) import GHC.Base @@ -70,9 +70,6 @@ instance Ord (ForeignPtr a) where instance Show (ForeignPtr a) where showsPrec p f = showsPrec p (unsafeForeignPtrToPtr f) -#include "Typeable.h" -INSTANCE_TYPEABLE1(ForeignPtr,foreignPtrTc,"ForeignPtr") - -- |A Finalizer is represented as a pointer to a foreign function that, at -- finalisation time, gets as an argument a plain pointer variant of the -- foreign pointer that the finalizer is associated with. @@ -240,7 +237,7 @@ castForeignPtr :: ForeignPtr a -> ForeignPtr b -- parameterised by one type into another type. castForeignPtr f = unsafeCoerce# f --- | Causes a the finalizers associated with a foreign pointer to be run +-- | Causes the finalizers associated with a foreign pointer to be run -- immediately. finalizeForeignPtr :: ForeignPtr a -> IO () finalizeForeignPtr foreignPtr = do