File tree Expand file tree Collapse file tree 2 files changed +6
-1
lines changed Expand file tree Collapse file tree 2 files changed +6
-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
@@ -110,7 +112,9 @@ buildStep vs1 k (BI.BufferRange op0 ope0) =
110
112
go vs1 op0
111
113
where
112
114
go vs ! op
113
- | op `plusPtr` bound <= ope0 = case vs of
115
+ | op `plusPtr` bound <= ope0 = do
116
+ dup_vs <- Dup. dupIO vs
117
+ case dup_vs of
114
118
TkWord x vs' -> PI. runB wordMP x op >>= go vs'
115
119
TkWord64 x vs' -> PI. runB word64MP x op >>= go vs'
116
120
You can’t perform that action at this time.
0 commit comments