File tree Expand file tree Collapse file tree 2 files changed +5
-1
lines changed Expand file tree Collapse file tree 2 files changed +5
-1
lines changed Original file line number Diff line number Diff line change @@ -94,6 +94,7 @@ library
94
94
bytestring >= 0.10.4 && < 0.12 ,
95
95
containers >= 0.5 && < 0.7 ,
96
96
deepseq >= 1.0 && < 1.5 ,
97
+ dupIO,
97
98
ghc-prim >= 0.3.1.0 && < 0.11 ,
98
99
half >= 0.2.2.3 && < 0.4 ,
99
100
primitive >= 0.5 && < 0.9 ,
Original file line number Diff line number Diff line change @@ -75,6 +75,8 @@ import qualified Codec.CBOR.ByteArray.Sliced as BAS
75
75
import Codec.CBOR.Encoding
76
76
import Codec.CBOR.Magic
77
77
78
+ import qualified Data.Dup as Dup
79
+
78
80
--------------------------------------------------------------------------------
79
81
80
82
-- | Turn an 'Encoding' into a lazy 'L.ByteString' in CBOR binary
@@ -194,7 +196,8 @@ buildStep vs1 k (BI.BufferRange op0 ope0) =
194
196
195
197
TkEnd -> k (BI. BufferRange op ope0)
196
198
197
- | otherwise = return $ BI. bufferFull bound op (buildStep vs k)
199
+ | otherwise = do vs' <- Dup. dupIO vs
200
+ return $ BI. bufferFull bound op (buildStep vs' k)
198
201
199
202
-- The maximum size in bytes of the fixed-size encodings
200
203
bound :: Int
You can’t perform that action at this time.
0 commit comments