You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Before GHC 8.6, there are no primitives for unaligned access to byte arrays. These have now been available for a long time, and I have a typeclass and functions for this in the primitive-unaligned library at (Data.Primitive.ByteArray.Unaligned)[https://hackage.haskell.org/package/primitive-unaligned-0.1.1.2/docs/Data-Primitive-ByteArray-Unaligned.html]. The design of the typeclass needs to be changed soon since GHC is gaining primops for unaligned Addr# access, but I'd like to go ahead and start down the path of getting these consolidated. The first step toward that is removing support for GHC < 8.6.
Please keep discussing here about dropping support for GHC 8.0, 8.2, and 8.4. Any discussion about unaligned access to primitive arrays should happen at #409
The text was updated successfully, but these errors were encountered:
A C header macro file in bytestringbytestring-cpp-macros.h notes that unaligned byte array access primops were not always safe before GHC 9.2.2:
#defineHS_UNALIGNED_ByteArray_OPS_OK \
MIN_VERSION_base(4,12,0) \
&& (MIN_VERSION_base(4,16,1) || HS_UNALIGNED_POKES_OK)
/*The unaligned ByteArray# primops became available with base-4.12.0,but require an unaligned-friendly host architecture to be safe to useuntil ghc-9.2.2; see https://gitlab.haskell.org/ghc/ghc/-/issues/21015*/
Before GHC 8.6, there are no primitives for unaligned access to byte arrays. These have now been available for a long time, and I have a typeclass and functions for this in the
primitive-unaligned
library at (Data.Primitive.ByteArray.Unaligned)[https://hackage.haskell.org/package/primitive-unaligned-0.1.1.2/docs/Data-Primitive-ByteArray-Unaligned.html]. The design of the typeclass needs to be changed soon since GHC is gaining primops for unalignedAddr#
access, but I'd like to go ahead and start down the path of getting these consolidated. The first step toward that is removing support for GHC < 8.6.Please keep discussing here about dropping support for GHC 8.0, 8.2, and 8.4. Any discussion about unaligned access to primitive arrays should happen at #409
The text was updated successfully, but these errors were encountered: