[commit: base] master: fix warnings (c8a4f96)
Simon Marlow
marlowsd at gmail.com
Fri Jul 13 13:08:49 CEST 2012
Repository : ssh://darcs.haskell.org//srv/darcs/packages/base
On branch : master
http://hackage.haskell.org/trac/ghc/changeset/c8a4f96b1180c746e90b1da8b3d7856f396af647
>---------------------------------------------------------------
commit c8a4f96b1180c746e90b1da8b3d7856f396af647
Author: Simon Marlow <marlowsd at gmail.com>
Date: Fri Jul 13 10:00:15 2012 +0100
fix warnings
>---------------------------------------------------------------
GHC/ForeignPtr.hs | 12 ++++++------
1 files changed, 6 insertions(+), 6 deletions(-)
diff --git a/GHC/ForeignPtr.hs b/GHC/ForeignPtr.hs
index f3ce527..244e0fd 100644
--- a/GHC/ForeignPtr.hs
+++ b/GHC/ForeignPtr.hs
@@ -189,12 +189,12 @@ mallocForeignPtrBytes (I# size) = do
-- size and alignment of the memory required is given explicitly as numbers of
-- bytes.
mallocForeignPtrAlignedBytes :: Int -> Int -> IO (ForeignPtr a)
-mallocForeignPtrAlignedBytes size alignment | size < 0 =
+mallocForeignPtrAlignedBytes size _align | size < 0 =
error "mallocForeignPtrAlignedBytes: size must be >= 0"
-mallocForeignPtrAlignedBytes (I# size) (I# alignment) = do
+mallocForeignPtrAlignedBytes (I# size) (I# align) = do
r <- newIORef (NoFinalizers, [])
IO $ \s ->
- case newAlignedPinnedByteArray# size alignment s of { (# s', mbarr# #) ->
+ case newAlignedPinnedByteArray# size align s of { (# s', mbarr# #) ->
(# s', ForeignPtr (byteArrayContents# (unsafeCoerce# mbarr#))
(MallocPtr mbarr# r) #)
}
@@ -243,10 +243,10 @@ mallocPlainForeignPtrBytes (I# size) = IO $ \s ->
-- finalizer is used. Attempts to add a finalizer will cause an
-- exception to be thrown.
mallocPlainForeignPtrAlignedBytes :: Int -> Int -> IO (ForeignPtr a)
-mallocPlainForeignPtrAlignedBytes size alignment | size < 0 =
+mallocPlainForeignPtrAlignedBytes size _align | size < 0 =
error "mallocPlainForeignPtrAlignedBytes: size must be >= 0"
-mallocPlainForeignPtrAlignedBytes (I# size) (I# alignment) = IO $ \s ->
- case newAlignedPinnedByteArray# size alignment s of { (# s', mbarr# #) ->
+mallocPlainForeignPtrAlignedBytes (I# size) (I# align) = IO $ \s ->
+ case newAlignedPinnedByteArray# size align s of { (# s', mbarr# #) ->
(# s', ForeignPtr (byteArrayContents# (unsafeCoerce# mbarr#))
(PlainPtr mbarr#) #)
}
More information about the Cvs-libraries
mailing list