X-Git-Url: http://git.megacz.com/?a=blobdiff_plain;f=GHC%2FForeignPtr.hs;h=2e737f0fa36263e69a7719aa30d9d83562478304;hb=c131671f4b4b2583e7e4a6145360270fe6146e57;hp=761e6f19cd184d4cf4fcbcd2420afdff50ef16da;hpb=ee819b35916cb3046247291b31f0b7748c5fd99b;p=ghc-base.git diff --git a/GHC/ForeignPtr.hs b/GHC/ForeignPtr.hs index 761e6f1..2e737f0 100644 --- a/GHC/ForeignPtr.hs +++ b/GHC/ForeignPtr.hs @@ -1,5 +1,11 @@ -{-# OPTIONS_GHC -XNoImplicitPrelude #-} +{-# LANGUAGE CPP + , NoImplicitPrelude + , BangPatterns + , MagicHash + , UnboxedTuples + #-} {-# OPTIONS_HADDOCK hide #-} + ----------------------------------------------------------------------------- -- | -- Module : GHC.ForeignPtr @@ -46,7 +52,6 @@ import GHC.IORef import GHC.STRef ( STRef(..) ) import GHC.Ptr ( Ptr(..), FunPtr(..) ) import GHC.Err -import GHC.Num ( fromInteger ) #include "Typeable.h" @@ -100,7 +105,7 @@ instance Show (ForeignPtr a) where showsPrec p f = showsPrec p (unsafeForeignPtrToPtr f) --- |A Finalizer is represented as a pointer to a foreign function that, at +-- |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. -- @@ -232,7 +237,7 @@ addForeignPtrFinalizer (FunPtr fp) (ForeignPtr p c) = case c of addForeignPtrFinalizerEnv :: FinalizerEnvPtr env a -> Ptr env -> ForeignPtr a -> IO () --- ^ like 'addForeignPtrFinalizerEnv' but allows the finalizer to be +-- ^ Like 'addForeignPtrFinalizerEnv' but allows the finalizer to be -- passed an additional environment parameter to be passed to the -- finalizer. The environment passed to the finalizer is fixed by the -- second argument to 'addForeignPtrFinalizerEnv'