projects
/
ghc-base.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (from parent 1:
62a95c9
)
peekArray docs: remove mentions of "this version" and "previous version"
author
Simon Marlow
<marlowsd@gmail.com>
Thu, 1 Jul 2010 12:53:33 +0000
(12:53 +0000)
committer
Simon Marlow
<marlowsd@gmail.com>
Thu, 1 Jul 2010 12:53:33 +0000
(12:53 +0000)
Foreign/Marshal/Array.hs
patch
|
blob
|
history
diff --git
a/Foreign/Marshal/Array.hs
b/Foreign/Marshal/Array.hs
index
8e013fe
..
8d8da7b
100644
(file)
--- a/
Foreign/Marshal/Array.hs
+++ b/
Foreign/Marshal/Array.hs
@@
-129,10
+129,8
@@
reallocArray0 ptr size = reallocArray ptr (size + 1)
-- marshalling
-- -----------
-- marshalling
-- -----------
--- |Convert an array of given length into a Haskell list. This version
--- traverses the array backwards using an accumulating parameter,
--- which uses constant stack space. The previous version using mapM
--- needed linear stack space.
+-- |Convert an array of given length into a Haskell list. The implementation
+-- is tail-recursive and so uses constant stack space.
--
peekArray :: Storable a => Int -> Ptr a -> IO [a]
peekArray size ptr | size <= 0 = return []
--
peekArray :: Storable a => Int -> Ptr a -> IO [a]
peekArray size ptr | size <= 0 = return []