[GHC] #8296: Patch: new primops for byte range copies ByteArray# <-> Addr#
GHC
ghc-devs at haskell.org
Sun Sep 15 23:56:27 CEST 2013
#8296: Patch: new primops for byte range copies ByteArray# <-> Addr#
-------------------------------------+------------------------------------
Reporter: duncan | Owner:
Type: feature request | Status: closed
Priority: normal | Milestone:
Component: Compiler | Version: 7.6.3
Resolution: fixed | Keywords:
Operating System: Unknown/Multiple | Architecture: Unknown/Multiple
Type of failure: None/Unknown | Difficulty: Unknown
Test Case: | Blocked By:
Blocking: | Related Tickets:
-------------------------------------+------------------------------------
Comment (by duncan):
Oh sorry about that. I see that I changed the primops to use `State#
RealWorld` after writing the tests and then didn't update the tests.
So actually I think using `RealWorld` here is probably right, because
these ops work with `Addr#`s, both reading and writing from them, and so
this does not really make sense in a pure ST context. Admititly, the
pattern in the existing primops is not totally clear about this, things
like `touch#` use `State# RealWorld`, but then all the primops like
`readIntOffAddr#` use `State# s`.
So not totally clear cut either way. I'll leave the choice to you. If you
want to switch back to using `State# RealWorld` as in my original patch,
then I attach the corresponding fix to the tests.
--
Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/8296#comment:7>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler
More information about the ghc-tickets
mailing list