From 0762bd40ea98a2338dee61e8cb3d6987e6e04324 Mon Sep 17 00:00:00 2001 From: krasimir Date: Tue, 28 Oct 2008 16:43:00 +0000 Subject: [PATCH] Data.Binary should use Data.ByteString.copy when decoding ByteStrings --- src/Data/Binary.hs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Data/Binary.hs b/src/Data/Binary.hs index fd0ca6c98..ac936674a 100644 --- a/src/Data/Binary.hs +++ b/src/Data/Binary.hs @@ -699,7 +699,7 @@ instance (Binary a, Binary b) => Binary (Either a b) where instance Binary B.ByteString where put bs = do put (B.length bs) putByteString bs - get = get >>= getByteString + get = liftM B.copy (get >>= getByteString) -- -- Using old versions of fps, this is a type synonym, and non portable