stackage/patching/patches/bytes-0.11.4.patch
2013-09-02 11:35:44 +03:00

18 lines
772 B
Diff

diff -ru orig/src/Data/Bytes/VarInt.hs new/src/Data/Bytes/VarInt.hs
--- orig/src/Data/Bytes/VarInt.hs 2013-09-02 11:35:18.532306195 +0300
+++ new/src/Data/Bytes/VarInt.hs 2013-09-02 11:35:18.000000000 +0300
@@ -36,9 +36,11 @@
-- | Integer/Word types serialized to base-128 variable-width ints.
--
--- >>> runPutL $ serialize (97 :: Word64)
+-- >>> import Data.Monoid (mconcat)
+-- >>> import Data.ByteString.Lazy (toChunks)
+-- >>> mconcat $ toChunks $ runPutL $ serialize (97 :: Word64)
-- "\NUL\NUL\NUL\NUL\NUL\NUL\NULa"
--- >>> runPutL $ serialize (97 :: VarInt Word64)
+-- >>> mconcat $ toChunks $ runPutL $ serialize (97 :: VarInt Word64)
-- "a"
newtype VarInt n = VarInt { unVarInt :: n }
deriving (Eq, Ord, Show, Enum, Num, Integral, Bounded, Real, Bits)