copyArray# bug

Herbert Valerio Riedel hvr at gnu.org
Tue Oct 9 11:39:05 CEST 2012


Roman Leshchinskiy <rl at cse.unsw.edu.au> writes:


[...]

> If I'm right then I would suggest not to use copyArray# and
> copyMutableArray# for GHC < 7.8.

I've grepped today's

 http://hackage.haskell.org/cgi-bin/hackage-scripts/archive.tar

for occurences of those two primitives, and this resulted in the
following matches:

--8<---------------cut here---------------start------------->8---
./unordered-containers-0.2.2.1/Data/HashMap/Array.hs:        case copyArray# (unArray src) sidx# (unMArray dst) didx# n# s# of
./unordered-containers-0.2.2.1/Data/HashMap/Array.hs:    case copyMutableArray# (unMArray src) sidx# (unMArray dst) didx# n# s# of
./persistent-vector-0.1.0.1/src/Data/Vector/Persistent/Array.hs:        case copyArray# (unArray src) sidx# (unMArray dst) didx# n# s# of
./persistent-vector-0.1.0.1/src/Data/Vector/Persistent/Array.hs:    case copyMutableArray# (unMArray src) sidx# (unMArray dst) didx# n# s# of
./primitive-0.5/Data/Primitive/Array.hs:  = primitive_ (copyArray# src# soff# dst# doff# len#)
./primitive-0.5/Data/Primitive/Array.hs:  = primitive_ (copyMutableArray# src# soff# dst# doff# len#)
./trifecta-0.53/src/Text/Trifecta/Util/Array.hs:  ST $ \ s# -> case copyArray# (unArray src) sidx# (unMArray dst) didx# n# s# of
./trifecta-0.53/src/Text/Trifecta/Util/Array.hs:  ST $ \ s# -> case copyMutableArray# (unMArray src) sidx# (unMArray dst) didx# n# s# of
--8<---------------cut here---------------end--------------->8---

...so, are you saying, that those packages above are dangerous to use
with GHC<=7.6.1?

cheers,
  hvr



More information about the Glasgow-haskell-users mailing list