1## Changes in version 0.7.0.1
2
3 * Allow building with GHC 8.12.
4
5## Changes in version 0.7.0.0
6
7  * Remove `Addr` data type, lifted code should use `Ptr a` now
8
9  * Define `MonadFail` instances for `Array` and `SmallArray`.
10
11  * Define `unsafeInterleave`.
12
13  * Add a `Prim` instance for `StablePtr`
14
15  * Remove `UnliftedArray` and related type classes
16
17  * Add a lot more tests for `PrimArray`.
18
19  * Added PrimMonad instance for CPS Writer and RWS monads from Transformers
20
21  * Remove useless accidental laziness in `atomicModifyMutVar`, making it match
22    `atomicModifyIORef`. The semantics should be the same.
23
24  * lots of little documentation twiddles.
25
26## Changes in version 0.6.4.1
27
28 * Add instances for the following newtypes from `base`:
29   `Const`, `Identity`, `Down`, `Dual`, `Sum`, `Product`,
30   `First`, `Last`, `Min`, `Max`
31
32 * Add `base-orphans` dependency to test suite to accomodate
33   older versions of GHC not having instances of `Show` and `Eq`
34   for some of the above newtypes.
35
36## Changes in version 0.6.4.0
37
38 * Introduce `Data.Primitive.PrimArray`, which offers types and function
39   for dealing with a `ByteArray` tagged with a phantom type variable for
40   tracking the element type.
41
42 * Implement `isByteArrayPinned` and `isMutableByteArrayPinned`.
43
44 * Add `Eq1`, `Ord1`, `Show1`, and `Read1` instances for `Array` and
45   `SmallArray`.
46
47 * Improve the test suite. This includes having property tests for
48   typeclasses from `base` such as `Eq`, `Ord`, `Functor`, `Applicative`,
49   `Monad`, `IsList`, `Monoid`, `Foldable`, and `Traversable`.
50
51 * Fix the broken `IsList` instance for `ByteArray`. The old definition
52   would allocate a byte array of the correct size and then leave the
53   memory unitialized instead of writing the list elements to it.
54
55 * Fix the broken `Functor` instance for `Array`. The old definition
56   would allocate an array of the correct size with thunks for erroring
57   installed at every index. It failed to replace these thunks with
58   the result of the function applied to the elements of the argument array.
59
60 * Fix the broken `Applicative` instances of `Array` and `SmallArray`.
61   The old implementation of `<*>` for `Array` failed to initialize
62   some elements but correctly initialized others in the resulting
63   `Array`. It is unclear what the old behavior of `<*>` was for
64   `SmallArray`, but it was incorrect.
65
66 * Fix the broken `Monad` instances for `Array` and `SmallArray`.
67
68 * Fix the implementation of `foldl1` in the `Foldable` instances for
69   `Array` and `SmallArray`. In both cases, the old implementation
70   simply returned the first element of the array and made no use of
71   the other elements in the array.
72
73 * Fix the implementation of `mconcat` in the `Monoid` instance for
74   `SmallArray`.
75
76 * Implement `Data.Primitive.Ptr`, implementations of `Ptr` functions
77   that require a `Prim` constraint instead of a `Storable` constraint.
78
79
80 * Add `PrimUnlifted` instances for `TVar` and `MVar`.
81
82 * Use `compareByteArrays#` for the `Eq` and `Ord` instances of
83   `ByteArray` when building with GHC 8.4 and newer.
84
85 * Add `Prim` instances for lots of types in `Foreign.C.Types` and
86   `System.Posix.Types`.
87
88 * Reexport `Data.Primitive.SmallArray` and `Data.Primitive.UnliftedArray`
89   from `Data.Primitive`.
90
91 * Add fold functions and map function to `Data.Primitive.UnliftedArray`.
92   Add typeclass instances for `IsList`, `Ord`, and `Show`.
93
94 * Add `defaultSetByteArray#` and `defaultSetOffAddr#` to
95   `Data.Primitive.Types`.
96
97 * Add `Data.Primitive.MVar`, a replacement for `Control.Concurrent.MVar`
98   that can run in any `PrimMonad` instead of just `IO`. It is not a full
99   replacement. Notably, it's missing masking functions and support for
100   adding finalizers.
101
102## Changes in version 0.6.3.0
103
104 * Add `PrimMonad` instances for `ContT`, `AccumT`, and `SelectT` from
105   `transformers`
106
107 * Add `Eq`, `Ord`, `Show`, and `IsList` instances for `ByteArray`
108
109 * Add `Semigroup` instances for `Array` and `SmallArray`. This allows
110   `primitive` to build on GHC 8.4 and later.
111
112## Changes in version 0.6.2.0
113
114 * Drop support for GHCs before 7.4
115
116 * `SmallArray` support
117
118 * `ArrayArray#` based support for more efficient arrays of unlifted pointer types
119
120 * Make `Array` and the like instances of various classes for convenient use
121
122 * Add `Prim` instances for Ptr and FunPtr
123
124 * Add `ioToPrim`, `stToPrim` and unsafe counterparts for situations that would
125   otherwise require type ascriptions on `primToPrim`
126
127 * Add `evalPrim`
128
129 * Add `PrimBase` instance for `IdentityT`
130
131## Changes in version 0.6.1.0
132
133 * Use more appropriate types in internal memset functions, which prevents
134   overflows/segfaults on 64-bit systems.
135
136 * Fixed a warning on GHC 7.10
137
138 * Worked around a -dcore-lint bug in GHC 7.6/7.7
139
140## Changes in version 0.6
141
142 * Split PrimMonad into two classes to allow automatic lifting of primitive
143   operations into monad transformers. The `internal` operation has moved to the
144   `PrimBase` class.
145
146 * Fixed the test suite on older GHCs
147
148## Changes in version 0.5.4.0
149
150 * Changed primitive_ to work around an oddity with GHC's code generation
151   on certain versions that led to side effects not happening when used
152   in conjunction with certain very unsafe IO performers.
153
154 * Allow primitive to build on GHC 7.9
155
156## Changes in version 0.5.3.0
157
158 * Implement `cloneArray` and `cloneMutableArray` primitives
159   (with fall-back implementations for GHCs prior to version 7.2.1)
160
161## Changes in version 0.5.2.1
162
163 * Add strict variants of `MutVar` modification functions
164   `atomicModifyMutVar'` and `modifyMutVar'`
165
166 * Fix compilation on Solaris 10 with GNU C 3.4.3
167
168## Changes in version 0.5.1.0
169
170 * Add support for GHC 7.7's new primitive `Bool` representation
171
172## Changes in version 0.5.0.1
173
174 * Disable array copying primitives for GHC 7.6.* and earlier
175
176## Changes in version 0.5
177
178 * New in `Data.Primitive.MutVar`: `atomicModifyMutVar`
179
180 * Efficient block fill operations: `setByteArray`, `setAddr`
181
182## Changes in version 0.4.1
183
184 * New module `Data.Primitive.MutVar`
185
186## Changes in version 0.4.0.1
187
188 * Critical bug fix in `fillByteArray`
189
190## Changes in version 0.4
191
192 * Support for GHC 7.2 array copying primitives
193
194 * New in `Data.Primitive.ByteArray`: `copyByteArray`,
195   `copyMutableByteArray`, `moveByteArray`, `fillByteArray`
196
197 * Deprecated in `Data.Primitive.ByteArray`: `memcpyByteArray`,
198   `memcpyByteArray'`, `memmoveByteArray`, `memsetByteArray`
199
200 * New in `Data.Primitive.Array`: `copyArray`, `copyMutableByteArray`
201
202 * New in `Data.Primitive.Addr`: `copyAddr`, `moveAddr`
203
204 * Deprecated in `Data.Primitive.Addr`: `memcpyAddr`
205