Skip to content
Snippets Groups Projects
Forked from Glasgow Haskell Compiler / GHC
5437 commits behind the upstream repository.
Ben Orchard's avatar
Ben Orchard authored
Without an understanding of immutable vs. mutable memory, the index
primop family have a potentially non-intuitive type signature:

    indexOffAddr :: Addr# -> Int# -> a
    readOffAddr  :: Addr# -> Int# -> State# d -> (# State# d, a #)

indexOffAddr# might seem like a free generality improvement, which it
certainly is not!

This change adds a brief note on mutability expectations for most
index/read/write access primops.
77171cd1
History
Code owners
Assign users and groups as approvers for specific file changes. Learn more.