Cheng Shao pushed to branch wip/fast-binary at Glasgow Haskell Compiler / GHC
Commits:
-
31136101
by Cheng Shao at 2026-01-07T23:41:02+01:00
1 changed file:
Changes:
| ... | ... | @@ -642,7 +642,7 @@ getPrim (ReadBinMem _ ix_r sz_r arr_r) size f = do |
| 642 | 642 | ix <- readFastMutInt ix_r
|
| 643 | 643 | when (ix + size > sz_r) $
|
| 644 | 644 | ioError (mkIOError eofErrorType "Data.Binary.getPrim" Nothing Nothing)
|
| 645 | - w <- unsafeWithForeignPtr arr_r $ \p -> f (p `plusPtr` ix)
|
|
| 645 | + !w <- unsafeWithForeignPtr arr_r $ \p -> f (p `plusPtr` ix)
|
|
| 646 | 646 | -- This is safe WRT #17760 as we we guarantee that the above line doesn't
|
| 647 | 647 | -- diverge
|
| 648 | 648 | writeFastMutInt ix_r (ix + size)
|