[commit: packages/binary] ghc-head: Fix code examples in documentation. (da72290)

git at git.haskell.org git at git.haskell.org
Fri Aug 30 15:20:21 CEST 2013


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

On branch  : ghc-head
Link       : http://git.haskell.org/?p=packages/binary.git;a=commit;h=da7229047dfa41f509d6e668e78359f6a8adb65b

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

commit da7229047dfa41f509d6e668e78359f6a8adb65b
Author: Lennart Kolmodin <kolmodin at gmail.com>
Date:   Sat Mar 2 01:27:35 2013 +0400

    Fix code examples in documentation.
    
    The old name runGetPartial was used instead of runGetIncremental.


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

da7229047dfa41f509d6e668e78359f6a8adb65b
 src/Data/Binary/Get.hs |    6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/src/Data/Binary/Get.hs b/src/Data/Binary/Get.hs
index ba78923..0cd99ac 100644
--- a/src/Data/Binary/Get.hs
+++ b/src/Data/Binary/Get.hs
@@ -257,7 +257,7 @@ calculateOffset r0 = go r0 0
 -- Run a 'Get' monad and return a tuple with thee values.
 -- The first value is the result of the decoder. The second and third are the
 -- unused input, and the number of consumed bytes.
-{-# DEPRECATED runGetState "Use runGetPartial instead. This function will be removed." #-}
+{-# DEPRECATED runGetState "Use runGetIncremental instead. This function will be removed." #-}
 runGetState :: Get a -> L.ByteString -> ByteOffset -> (a, L.ByteString, ByteOffset)
 runGetState g lbs0 pos' = go (runGetIncremental g) lbs0
   where
@@ -308,7 +308,7 @@ runGet g lbs0 = feedAll (runGetIncremental g) lbs0
 -- will add the input to 'B.ByteString' of unconsumed input.
 --
 -- @
---    'runGetPartial' myParser \`pushChunk\` myInput1 \`pushChunk\` myInput2
+--    'runGetIncremental' myParser \`pushChunk\` myInput1 \`pushChunk\` myInput2
 -- @
 pushChunk :: Decoder a -> B.ByteString -> Decoder a
 pushChunk r inp =
@@ -322,7 +322,7 @@ pushChunk r inp =
 -- will add the input to 'ByteString' of unconsumed input.
 --
 -- @
---    'runGetPartial' myParser \`pushChunks\` myLazyByteString
+--    'runGetIncremental' myParser \`pushChunks\` myLazyByteString
 -- @
 pushChunks :: Decoder a -> L.ByteString -> Decoder a
 pushChunks r0 = go r0 . L.toChunks





More information about the ghc-commits mailing list