projects
/
ghc-base.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Remove unused imports
[ghc-base.git]
/
Foreign
/
Marshal
/
Array.hs
diff --git
a/Foreign/Marshal/Array.hs
b/Foreign/Marshal/Array.hs
index
787c37d
..
a3d9d16
100644
(file)
--- a/
Foreign/Marshal/Array.hs
+++ b/
Foreign/Marshal/Array.hs
@@
-1,4
+1,4
@@
-{-# OPTIONS -fno-implicit-prelude #-}
+{-# OPTIONS_GHC -XNoImplicitPrelude #-}
-----------------------------------------------------------------------------
-- |
-- Module : Foreign.Marshal.Array
-----------------------------------------------------------------------------
-- |
-- Module : Foreign.Marshal.Array
@@
-62,9
+62,8
@@
module Foreign.Marshal.Array (
advancePtr, -- :: Storable a => Ptr a -> Int -> Ptr a
) where
advancePtr, -- :: Storable a => Ptr a -> Int -> Ptr a
) where
-import Control.Monad
-import Foreign.Ptr (Ptr, plusPtr)
-import Foreign.Storable (Storable(sizeOf,peekElemOff,pokeElemOff))
+import Foreign.Ptr (Ptr, plusPtr)
+import Foreign.Storable (Storable(sizeOf,peekElemOff,pokeElemOff))
import Foreign.Marshal.Alloc (mallocBytes, allocaBytes, reallocBytes)
import Foreign.Marshal.Utils (copyBytes, moveBytes)
import Foreign.Marshal.Alloc (mallocBytes, allocaBytes, reallocBytes)
import Foreign.Marshal.Utils (copyBytes, moveBytes)
@@
-153,7
+152,7
@@
pokeArray ptr vals = zipWithM_ (pokeElemOff ptr) [0..] vals
#else
pokeArray ptr vals = go vals 0#
where go [] n# = return ()
#else
pokeArray ptr vals = go vals 0#
where go [] n# = return ()
- go (val:vals) n# = do pokeElemOff ptr (I# n#) val; go vals (n# +# 1#)
+ go (val:vals) n# = do pokeElemOff ptr (I# n#) val; go vals (n# +# 1#)
#endif
-- |Write the list elements consecutive into memory and terminate them with the
#endif
-- |Write the list elements consecutive into memory and terminate them with the
@@
-167,7
+166,7
@@
pokeArray0 marker ptr vals = do
#else
pokeArray0 marker ptr vals = go vals 0#
where go [] n# = pokeElemOff ptr (I# n#) marker
#else
pokeArray0 marker ptr vals = go vals 0#
where go [] n# = pokeElemOff ptr (I# n#) marker
- go (val:vals) n# = do pokeElemOff ptr (I# n#) val; go vals (n# +# 1#)
+ go (val:vals) n# = do pokeElemOff ptr (I# n#) val; go vals (n# +# 1#)
#endif
#endif