Changelog History
Page 1
-
v0.7.1.0 Changes
Introduce convenience class
MonadPrim
andMonadPrimBase
.Add
PrimMonad
andPrimBase
instances forLazy.ST
(GHC >= 8.2). thanks to Avi Dessauer (@Avi-D-coder) for this first contributionAdd
freezeByteArray
andfreezePrimArray
.Add
compareByteArrays
.Add
shrinkMutableByteArray
.Add
Eq
instances forMutableByteArray
andMutablePrimArray
. by Andrew MartinAdd functions for manipulating pinned Prim Arrays by Andrew Martin
Add
copyPtrToMutableByteArray
.Add
NFData
instances forByteArray
,MutableByteArray
,PrimArray
andMutablePrimArray
. by Callan McGillAdd
shrinkSmallMutableArray
.Add
clonePrimArray
andcloneMutablePrimArray
.Add
cloneMutableByteArray
andcloneByteArray
.Add
Prim
instances forWordPtr
andIntPtr
.Add
NFData
instances forArray
andSmallArray
. by Callan McGillAdd
copyByteArrayToPtr
andcopyMutableByteArrayToPtr
.Export
arrayFromList
andarrayFromListN
.
-
v0.7.0.1 Changes
February 29, 2020- Allow building with GHC 8.12. Thanks Ryan GL Scott for this and every compat patch over time.
-
v0.7.0.0 Changes
May 17, 2019Remove
Addr
data type, lifted code should usePtr a
nowDefine
MonadFail
instances forArray
andSmallArray
.Define
unsafeInterleave
.Add a
Prim
instance forStablePtr
Remove
UnliftedArray
and related type classesAdd a lot more tests for
PrimArray
.Added PrimMonad instance for CPS Writer and RWS monads from Transformers
Remove useless accidental laziness in
atomicModifyMutVar
, making it matchatomicModifyIORef
. The semantics should be the same.lots of little documentation twiddles.
-
v0.6.4.1 Changes
Add instances for the following newtypes from
base
:Const
,Identity
,Down
,Dual
,Sum
,Product
,First
,Last
,Min
,Max
Add
base-orphans
dependency to test suite to accomodate older versions of GHC not having instances ofShow
andEq
for some of the above newtypes.
-
v0.6.4.0 Changes
May 30, 2018Introduce
Data.Primitive.PrimArray
, which offers types and function for dealing with aByteArray
tagged with a phantom type variable for tracking the element type.Implement
isByteArrayPinned
andisMutableByteArrayPinned
.Add
Eq1
,Ord1
,Show1
, andRead1
instances forArray
andSmallArray
.Improve the test suite. This includes having property tests for typeclasses from
base
such asEq
,Ord
,Functor
,Applicative
,Monad
,IsList
,Monoid
,Foldable
, andTraversable
.Fix the broken
IsList
instance 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
Functor
instance 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
Applicative
instances ofArray
andSmallArray
. The old implementation of<*>
forArray
failed 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
Monad
instances forArray
andSmallArray
.Fix the implementation of
foldl1
in theFoldable
instances forArray
andSmallArray
. 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
mconcat
in theMonoid
instance forSmallArray
.Implement
Data.Primitive.Ptr
, implementations ofPtr
functions that require aPrim
constraint instead of aStorable
constraint.Add
PrimUnlifted
instances forTVar
andMVar
.Use
compareByteArrays#
for theEq
andOrd
instances ofByteArray
when building with GHC 8.4 and newer.Add
Prim
instances for lots of types inForeign.C.Types
andSystem.Posix.Types
.Reexport
Data.Primitive.SmallArray
andData.Primitive.UnliftedArray
fromData.Primitive
.Add fold functions and map function to
Data.Primitive.UnliftedArray
. Add typeclass instances forIsList
,Ord
, andShow
.Add
defaultSetByteArray#
anddefaultSetOffAddr#
toData.Primitive.Types
.Add
Data.Primitive.MVar
, a replacement forControl.Concurrent.MVar
that can run in anyPrimMonad
instead of justIO
. It is not a full replacement. Notably, it's missing masking functions and support for adding finalizers.
-
v0.6.3.0 Changes
January 22, 2018➕ Add
PrimMonad
instances forContT
,AccumT
, andSelectT
from
transformers
➕ Add
Eq
,Ord
,Show
, andIsList
instances forByteArray
➕ Add
Semigroup
instances forArray
andSmallArray
. This allows
🏗primitive
to build on GHC 8.4 and later. -
v0.6.2.0 Changes
Drop support for GHCs before 7.4
SmallArray
supportArrayArray#
based support for more efficient arrays of unlifted pointer typesMake
Array
and the like instances of various classes for convenient useAdd
Prim
instances for Ptr and FunPtrAdd
ioToPrim
,stToPrim
and unsafe counterparts for situations that would otherwise require type ascriptions onprimToPrim
Add
evalPrim
Add
PrimBase
instance forIdentityT
-
v0.6.1.2
March 08, 2019 -
v0.6.1.0 Changes
September 20, 2015Use 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
-
v0.6 Changes
Split PrimMonad into two classes to allow automatic lifting of primitive operations into monad transformers. The
internal
operation has moved to thePrimBase
class.Fixed the test suite on older GHCs