Changelog for primitive-0.6.4.0
Changes in version 0.6.4.0
-
Introduce
Data.Primitive.PrimArray, which offers types and function for dealing with aByteArraytagged with a phantom type variable for tracking the element type. -
Implement
isByteArrayPinnedandisMutableByteArrayPinned. -
Add
Eq1,Ord1,Show1, andRead1instances forArrayandSmallArray. -
Improve the test suite. This includes having property tests for typeclasses from
basesuch asEq,Ord,Functor,Applicative,Monad,IsList,Monoid,Foldable, andTraversable. -
Fix the broken
IsListinstance forByteArray. The old definition would allocate a byte array of the correct size and then leave the memory unitialized instead of writing the list elements to it. -
Fix the broken
Functorinstance forArray. The old definition would allocate an array of the correct size with thunks for erroring installed at every index. It failed to replace these thunks with the result of the function applied to the elements of the argument array. -
Fix the broken
Applicativeinstances ofArrayandSmallArray. The old implementation of<*>forArrayfailed to initialize some elements but correctly initialized others in the resultingArray. It is unclear what the old behavior of<*>was forSmallArray, but it was incorrect. -
Fix the broken
Monadinstances forArrayandSmallArray. -
Fix the implementation of
foldl1in theFoldableinstances forArrayandSmallArray. In both cases, the old implementation simply returned the first element of the array and made no use of the other elements in the array. -
Fix the implementation of
mconcatin theMonoidinstance forSmallArray. -
Implement
Data.Primitive.Ptr, implementations ofPtrfunctions that require aPrimconstraint instead of aStorableconstraint. -
Add
PrimUnliftedinstances forTVarandMVar. -
Use
compareByteArrays#for theEqandOrdinstances ofByteArraywhen building with GHC 8.4 and newer. -
Add
Priminstances for lots of types inForeign.C.TypesandSystem.Posix.Types. -
Reexport
Data.Primitive.SmallArrayandData.Primitive.UnliftedArrayfromData.Primitive. -
Add fold functions and map function to
Data.Primitive.UnliftedArray. Add typeclass instances forIsList,Ord, andShow. -
Add
defaultSetByteArray#anddefaultSetOffAddr#toData.Primitive.Types.
Changes in version 0.6.3.0
-
Add
PrimMonadinstances forContT,AccumT, andSelectTfromtransformers -
Add
Eq,Ord,Show, andIsListinstances forByteArray -
Add
Semigroupinstances forArrayandSmallArray. This allowsprimitiveto build on GHC 8.4 and later.
Changes in version 0.6.2.0
-
Drop support for GHCs before 7.4
-
SmallArraysupport -
ArrayArray#based support for more efficient arrays of unlifted pointer types -
Make
Arrayand the like instances of various classes for convenient use -
Add
Priminstances for Ptr and FunPtr -
Add
ioToPrim,stToPrimand unsafe counterparts for situations that would otherwise require type ascriptions onprimToPrim -
Add
evalPrim -
Add
PrimBaseinstance forIdentityT
Changes in version 0.6.1.0
-
Use more appropriate types in internal memset functions, which prevents overflows/segfaults on 64-bit systems.
-
Fixed a warning on GHC 7.10
-
Worked around a -dcore-lint bug in GHC 7.6/7.7
Changes in version 0.6
-
Split PrimMonad into two classes to allow automatic lifting of primitive operations into monad transformers. The
internaloperation has moved to thePrimBaseclass. -
Fixed the test suite on older GHCs
Changes in version 0.5.4.0
-
Changed primitive_ to work around an oddity with GHC's code generation on certain versions that led to side effects not happening when used in conjunction with certain very unsafe IO performers.
-
Allow primitive to build on GHC 7.9
Changes in version 0.5.3.0
- Implement
cloneArrayandcloneMutableArrayprimitives (with fall-back implementations for GHCs prior to version 7.2.1)
Changes in version 0.5.2.1
-
Add strict variants of
MutVarmodification functionsatomicModifyMutVar'andmodifyMutVar' -
Fix compilation on Solaris 10 with GNU C 3.4.3
Changes in version 0.5.1.0
- Add support for GHC 7.7's new primitive
Boolrepresentation
Changes in version 0.5.0.1
- Disable array copying primitives for GHC 7.6.* and earlier
Changes in version 0.5
-
New in
Data.Primitive.MutVar:atomicModifyMutVar -
Efficient block fill operations:
setByteArray,setAddr
Changes in version 0.4.1
- New module
Data.Primitive.MutVar
Changes in version 0.4.0.1
- Critical bug fix in
fillByteArray
Changes in version 0.4
-
Support for GHC 7.2 array copying primitives
-
New in
Data.Primitive.ByteArray:copyByteArray,copyMutableByteArray,moveByteArray,fillByteArray -
Deprecated in
Data.Primitive.ByteArray:memcpyByteArray,memcpyByteArray',memmoveByteArray,memsetByteArray -
New in
Data.Primitive.Array:copyArray,copyMutableByteArray -
New in
Data.Primitive.Addr:copyAddr,moveAddr -
Deprecated in
Data.Primitive.Addr:memcpyAddr