Skip to content

Commit a599027

Browse files
committed
Use bang patterns on checksum
1 parent 17eb0d6 commit a599027

File tree

1 file changed

+2
-2
lines changed
  • ouroboros-consensus/src/ouroboros-consensus/Ouroboros/Consensus/Util

1 file changed

+2
-2
lines changed

ouroboros-consensus/src/ouroboros-consensus/Ouroboros/Consensus/Util/CBOR.hs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -197,11 +197,11 @@ readIncremental = \(SomeHasFS hasFS) decoder fp -> do
197197
-> CRC
198198
-> CBOR.R.IDecode (U.PrimState m) a
199199
-> m (Either ReadIncrementalErr (a, CRC))
200-
go hasFS@HasFS{..} h checksum (CBOR.R.Partial k) = do
200+
go hasFS@HasFS{..} h !checksum (CBOR.R.Partial k) = do
201201
bs <- hGetSome h (fromIntegral defaultChunkSize)
202202
dec' <- U.stToIO $ k (checkEmpty bs)
203203
go hasFS h (updateCRC bs checksum) dec'
204-
go _ _ checksum (CBOR.R.Done leftover _ a) =
204+
go _ _ !checksum (CBOR.R.Done leftover _ a) =
205205
return $ if BS.null leftover
206206
then Right (a, checksum)
207207
else Left $ TrailingBytes leftover

0 commit comments

Comments
 (0)