[commit: ghc] wip/ci-i386, wip/linters, wip/ww-noinline: Minor documentation fix in GHC.ForeignPtr (7752fa5)

git at git.haskell.org git at git.haskell.org
Tue Feb 19 14:13:01 UTC 2019


Repository : ssh://git@git.haskell.org/ghc

On branches: wip/ci-i386,wip/linters,wip/ww-noinline
Link       : http://ghc.haskell.org/trac/ghc/changeset/7752fa54909a10b565a80a5ca8b751e174b14282/ghc

>---------------------------------------------------------------

commit 7752fa54909a10b565a80a5ca8b751e174b14282
Author: Ömer Sinan Ağacan <omeragacan at gmail.com>
Date:   Wed Feb 13 13:52:17 2019 +0300

    Minor documentation fix in GHC.ForeignPtr


>---------------------------------------------------------------

7752fa54909a10b565a80a5ca8b751e174b14282
 libraries/base/GHC/ForeignPtr.hs | 8 +++-----
 1 file changed, 3 insertions(+), 5 deletions(-)

diff --git a/libraries/base/GHC/ForeignPtr.hs b/libraries/base/GHC/ForeignPtr.hs
index dc3b88a..965ebb0 100644
--- a/libraries/base/GHC/ForeignPtr.hs
+++ b/libraries/base/GHC/ForeignPtr.hs
@@ -250,7 +250,7 @@ mallocPlainForeignPtrAlignedBytes (I# size) (I# align) = IO $ \s ->
      }
 
 addForeignPtrFinalizer :: FinalizerPtr a -> ForeignPtr a -> IO ()
--- ^This function adds a finalizer to the given foreign object.  The
+-- ^ This function adds a finalizer to the given foreign object.  The
 -- finalizer will run /before/ all other finalizers for the same
 -- object which have already been registered.
 addForeignPtrFinalizer (FunPtr fp) (ForeignPtr p c) = case c of
@@ -269,10 +269,8 @@ 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
--- 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'
+-- ^ Like 'addForeignPtrFinalizer' but the finalizer is passed an additional
+-- environment parameter.
 addForeignPtrFinalizerEnv (FunPtr fp) (Ptr ep) (ForeignPtr p c) = case c of
   PlainForeignPtr r -> insertCFinalizer r fp 1# ep p ()
   MallocPtr     _ r -> insertCFinalizer r fp 1# ep p c



More information about the ghc-commits mailing list