|
1 | 1 | # Changes in version 0.13.0.0 |
2 | 2 |
|
3 | | - * Methods of type classes `Data.Vector.Generic.Mutable.MVector` and |
4 | | - `Data.Vector.Generic.Vector` use concrete monads (ST,etc) being |
5 | | - polymorphic. This allows use of GND and deriving via to define |
6 | | - instances. Rest of API is unchanged and most existing instances should |
7 | | - compiler fine with new definitions. |
8 | 3 | * `mkType` from `Data.Vector.Generic` is deprecated in favor of |
9 | 4 | `Data.Data.mkNoRepType` |
10 | 5 | * The role signatures on several `Vector` types were too permissive, so they |
11 | 6 | have been tightened up: |
12 | 7 | * The role signature for `Data.Vector.Mutable.MVector` is now |
13 | 8 | `type role MVector nominal representational` (previously, both arguments |
14 | | - were `phantom`). |
| 9 | + were `phantom`). [#224](https://github.com/haskell/vector/pull/224) |
15 | 10 | * The role signature for `Data.Vector.Primitive.Vector` is now |
16 | 11 | `type role Vector nominal` (previously, it was `phantom`). |
17 | 12 | The role signature for `Data.Vector.Primitive.Mutable.MVector` is now |
18 | 13 | `type role MVector nominal nominal` (previously, both arguments were |
19 | | - `phantom`). |
| 14 | + `phantom`). [#316](https://github.com/haskell/vector/pull/316) |
20 | 15 | * The role signature for `Data.Vector.Storable.Vector` is now |
21 | 16 | `type role Vector nominal` (previous, it was `phantom`), and the signature |
22 | 17 | for `Data.Vector.Storable.Mutable.MVector` is now |
23 | 18 | `type role MVector nominal nominal` (previous, both arguments were |
24 | | - `phantom`). |
| 19 | + `phantom`). [#235](https://github.com/haskell/vector/pull/235) |
25 | 20 |
|
26 | 21 | We pick `nominal` for the role of the last argument instead of |
27 | | - `representational` since the internal structure of a `Storable` vector |
28 | | - is determined by the `Storable` instance of the element type, and it is |
29 | | - not guaranteed that the `Storable` instances between two |
30 | | - representationally equal types will preserve this internal structure. |
31 | | - One consequence of this choice is that it is no longer possible to |
32 | | - `coerce` between `Storable.Vector a` and `Storable.Vector b` if `a` and |
33 | | - `b` are nominally distinct but representationally equal types. We now |
34 | | - provide `unsafeCoerce{M}Vector` functions in |
35 | | - `Data.Vector.Storable{.Mutable}` to allow this (the onus is on the user |
36 | | - to ensure that no `Storable` invariants are broken when using these |
37 | | - functions). |
| 22 | + `representational` since the internal structure of a `Storable` vector is |
| 23 | + determined by the `Storable` instance of the element type, and it is not |
| 24 | + guaranteed that the `Storable` instances between two representationally |
| 25 | + equal types will preserve this internal structure. One consequence of this |
| 26 | + choice is that it is no longer possible to `coerce` between |
| 27 | + `Storable.Vector a` and `Storable.Vector b` if `a` and `b` are nominally |
| 28 | + distinct but representationally equal types. We now provide |
| 29 | + `unsafeCoerce{M}Vector` and `unsafeCast` functions to allow this (the onus |
| 30 | + is on the user to ensure that no `Storable` invariants are broken when |
| 31 | + using these functions). |
| 32 | + * Methods of type classes `Data.Vector.Generic.Mutable.MVector` and |
| 33 | + `Data.Vector.Generic.Vector` use concrete monads (`ST`, etc) istead of being |
| 34 | + polymorphic (`PrimMonad`, etc). [#335](https://github.com/haskell/vector/pull/335). |
| 35 | + This makes it possible to derive `Unbox` with: |
| 36 | + * `GeneralizedNewtypeDeriving` |
| 37 | + * via `UnboxViaPrim` and `Prim` instance |
| 38 | + * via `As` and `IsoUnbox` instance: [#378](https://github.com/haskell/vector/pull/378) |
| 39 | + * Add `MonadFix` instance for boxed vectors: [#312](https://github.com/haskell/vector/pull/312) |
| 40 | + * Re-export `PrimMonad` and `RealWorld` from mutable vectors: |
| 41 | + [#320](https://github.com/haskell/vector/pull/320) |
| 42 | + * Add `maximumOn` and `minimumOn`: [#356](https://github.com/haskell/vector/pull/356) |
38 | 43 | * The functions `scanl1`, `scanl1'`, `scanr1`, and `scanr1'` for immutable |
39 | 44 | vectors are now defined when given empty vectors as arguments, |
40 | 45 | in which case they return empty vectors. This new behavior is consistent |
41 | 46 | with the one of the corresponding functions in `Data.List`. |
42 | 47 | Prior to this change, applying an empty vector to any of those functions |
43 | 48 | resulted in an error. This change was introduced in: |
44 | 49 | [#382](https://github.com/haskell/vector/pull/382) |
45 | | -* Remove redundant `Storable` constraints on to/from `ForeignPtr` conversions |
46 | | -* Add `unsafeCast` to `Primitive` vectors |
47 | | -* Add `groupBy` and `group` for `Data.Vector.Generic` and the specialized |
48 | | - version in `Data.Vector`, `Data.Vector.Unboxed`, `Data.Vector.Storable` and |
49 | | - `Data.Vector.Primitive`. |
50 | | -* Add `toArraySlice` and `unsafeFromArraySlice` functions for conversion to and |
51 | | - from the underlying boxed `Array`. |
| 50 | + * Change allocation strategy for `unfoldrN`: [#387](https://github.com/haskell/vector/pull/387) |
| 51 | + * Remove `CPP` driven error reporting in favor of `HasCallStack`: |
| 52 | + [#397](https://github.com/haskell/vector/pull/397) |
| 53 | + * Remove redundant `Storable` constraints on to/from `ForeignPtr` conversions: |
| 54 | + [#394](https://github.com/haskell/vector/pull/394) |
| 55 | + * Add `unsafeCast` to `Primitive` vectors: [#401](https://github.com/haskell/vector/pull/401) |
| 56 | + * Make `(!?)` operator strict: [#402](https://github.com/haskell/vector/pull/402) |
| 57 | + * Add `readMaybe`: [#425](https://github.com/haskell/vector/pull/425) |
| 58 | + * Add `groupBy` and `group` for `Data.Vector.Generic` and the specialized |
| 59 | + version in `Data.Vector`, `Data.Vector.Unboxed`, `Data.Vector.Storable` and |
| 60 | + `Data.Vector.Primitive`. [#427](https://github.com/haskell/vector/pull/427) |
| 61 | + * Add `toArraySlice` and `unsafeFromArraySlice` functions for conversion to and |
| 62 | + from the underlying boxed `Array`: [#434](https://github.com/haskell/vector/pull/434) |
52 | 63 |
|
53 | 64 | # Changes in version 0.12.3.1 |
54 | 65 |
|
55 | | -* Bugfix for ghcjs and `Double` memset for `Storable` vector: |
56 | | - [#410](https://github.com/haskell/vector/issues/410) |
57 | | -* Avoid haddock bug: [#383](https://github.com/haskell/vector/issues/383) |
58 | | -* Improve haddock and doctests |
59 | | -* Disable problematic tests with -boundschecks [#407](https://github.com/haskell/vector/pull/407) |
| 66 | + * Bugfix for ghcjs and `Double` memset for `Storable` vector: |
| 67 | + [#410](https://github.com/haskell/vector/issues/410) |
| 68 | + * Avoid haddock bug: [#383](https://github.com/haskell/vector/issues/383) |
| 69 | + * Improve haddock and doctests |
| 70 | + * Disable problematic tests with -boundschecks [#407](https://github.com/haskell/vector/pull/407) |
60 | 71 |
|
61 | 72 | # Changes in version 0.12.3.0 |
62 | 73 |
|
|
0 commit comments