X-Git-Url: http://git.megacz.com/?a=blobdiff_plain;f=Foreign%2FMarshal%2FUtils.hs;h=7fcacfa8c78560e0c425b737ecac3255ea5c45e2;hb=bf1530efdee344ee89cac1e37cb208222b4edff2;hp=4aa0e74cb2fc6b7f02bc9a8b55ae88c236ecd64d;hpb=10de2c656f74562b662c22928be85e1b3ccda796;p=ghc-base.git diff --git a/Foreign/Marshal/Utils.hs b/Foreign/Marshal/Utils.hs index 4aa0e74..7fcacfa 100644 --- a/Foreign/Marshal/Utils.hs +++ b/Foreign/Marshal/Utils.hs @@ -53,7 +53,6 @@ import Foreign.C.Types ( CSize ) import Foreign.Marshal.Alloc ( malloc, alloca ) #ifdef __GLASGOW_HASKELL__ -import GHC.IOBase import GHC.Real ( fromIntegral ) import GHC.Num import GHC.Base @@ -114,7 +113,7 @@ toBool = (/= 0) -- marshalling of Maybe values -- --------------------------- --- |Allocate storage and marshall a storable value wrapped into a 'Maybe' +-- |Allocate storage and marshal a storable value wrapped into a 'Maybe' -- -- * the 'nullPtr' is used to represent 'Nothing' -- @@ -159,14 +158,14 @@ withMany withFoo (x:xs) f = withFoo x $ \x' -> -- first (destination); the copied areas may /not/ overlap -- copyBytes :: Ptr a -> Ptr a -> Int -> IO () -copyBytes dest src size = do memcpy dest src (fromIntegral size) +copyBytes dest src size = do _ <- memcpy dest src (fromIntegral size) return () -- |Copies the given number of bytes from the second area (source) into the -- first (destination); the copied areas /may/ overlap -- moveBytes :: Ptr a -> Ptr a -> Int -> IO () -moveBytes dest src size = do memmove dest src (fromIntegral size) +moveBytes dest src size = do _ <- memmove dest src (fromIntegral size) return ()