Skip to content

Commit 967159d

Browse files
authored
Merge pull request #437 from haskell/release/vector-0.13
Prepare vector 0.13.0.0 release
2 parents 42f92f3 + 3358ca5 commit 967159d

File tree

27 files changed

+179
-65
lines changed

27 files changed

+179
-65
lines changed

vector-stream/LICENSE

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,7 @@
11
Copyright (c) 2008-2012, Roman Leshchinskiy
2+
2020-2022, Alexey Kuleshevich
3+
2020-2022, Aleksey Khudyakov
4+
2020-2022, Andrew Lelechenko
25
All rights reserved.
36

47
Redistribution and use in source and binary forms, with or without

vector-stream/src/Data/Stream/Monadic.hs

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,9 +10,12 @@
1010
-- |
1111
-- Module : Data.Stream.Monadic
1212
-- Copyright : (c) Roman Leshchinskiy 2008-2010
13+
-- Alexey Kuleshevich 2020-2022
14+
-- Aleksey Khudyakov 2020-2022
15+
-- Andrew Lelechenko 2020-2022
1316
-- License : BSD-style
1417
--
15-
-- Maintainer : Roman Leshchinskiy <[email protected]>
18+
-- Maintainer : Haskell Libraries Team <[email protected]>
1619
-- Stability : experimental
1720
-- Portability : non-portable
1821
--

vector-stream/vector-stream.cabal

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,9 @@ License-File: LICENSE
66
Author: Roman Leshchinskiy <[email protected]>
77
Maintainer: Haskell Libraries Team <[email protected]>
88
Copyright: (c) Roman Leshchinskiy 2008-2012
9+
Alexey Kuleshevich 2020-2022,
10+
Aleksey Khudyakov 2020-2022,
11+
Andrew Lelechenko 2020-2022
912
Homepage: https://github.com/haskell/vector
1013
Bug-Reports: https://github.com/haskell/vector/issues
1114
Category: Data, Data Structures
@@ -20,8 +23,9 @@ Tested-With:
2023
GHC == 8.4.4,
2124
GHC == 8.6.5,
2225
GHC == 8.8.4,
23-
GHC == 8.10.4
24-
GHC == 9.0.1
26+
GHC == 8.10.4,
27+
GHC == 9.0.1,
28+
GHC == 9.2.3
2529

2630
Cabal-Version: >=1.10
2731
Build-Type: Simple
@@ -45,3 +49,4 @@ Library
4549
source-repository head
4650
type: git
4751
location: https://github.com/haskell/vector.git
52+
subdir: vector-stream

vector/LICENSE

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,7 @@
11
Copyright (c) 2008-2012, Roman Leshchinskiy
2+
2020-2022, Alexey Kuleshevich
3+
2020-2022, Aleksey Khudyakov
4+
2020-2022, Andrew Lelechenko
25
All rights reserved.
36

47
Redistribution and use in source and binary forms, with or without

vector/changelog.md

Lines changed: 42 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -1,62 +1,73 @@
11
# Changes in version 0.13.0.0
22

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.
83
* `mkType` from `Data.Vector.Generic` is deprecated in favor of
94
`Data.Data.mkNoRepType`
105
* The role signatures on several `Vector` types were too permissive, so they
116
have been tightened up:
127
* The role signature for `Data.Vector.Mutable.MVector` is now
138
`type role MVector nominal representational` (previously, both arguments
14-
were `phantom`).
9+
were `phantom`). [#224](https://github.com/haskell/vector/pull/224)
1510
* The role signature for `Data.Vector.Primitive.Vector` is now
1611
`type role Vector nominal` (previously, it was `phantom`).
1712
The role signature for `Data.Vector.Primitive.Mutable.MVector` is now
1813
`type role MVector nominal nominal` (previously, both arguments were
19-
`phantom`).
14+
`phantom`). [#316](https://github.com/haskell/vector/pull/316)
2015
* The role signature for `Data.Vector.Storable.Vector` is now
2116
`type role Vector nominal` (previous, it was `phantom`), and the signature
2217
for `Data.Vector.Storable.Mutable.MVector` is now
2318
`type role MVector nominal nominal` (previous, both arguments were
24-
`phantom`).
19+
`phantom`). [#235](https://github.com/haskell/vector/pull/235)
2520

2621
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)
3843
* The functions `scanl1`, `scanl1'`, `scanr1`, and `scanr1'` for immutable
3944
vectors are now defined when given empty vectors as arguments,
4045
in which case they return empty vectors. This new behavior is consistent
4146
with the one of the corresponding functions in `Data.List`.
4247
Prior to this change, applying an empty vector to any of those functions
4348
resulted in an error. This change was introduced in:
4449
[#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)
5263

5364
# Changes in version 0.12.3.1
5465

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)
6071

6172
# Changes in version 0.12.3.0
6273

vector/src/Data/Vector.hs

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,9 +9,12 @@
99
-- |
1010
-- Module : Data.Vector
1111
-- Copyright : (c) Roman Leshchinskiy 2008-2010
12+
-- Alexey Kuleshevich 2020-2022
13+
-- Aleksey Khudyakov 2020-2022
14+
-- Andrew Lelechenko 2020-2022
1215
-- License : BSD-style
1316
--
14-
-- Maintainer : Roman Leshchinskiy <[email protected]>
17+
-- Maintainer : Haskell Libraries Team <[email protected]>
1518
-- Stability : experimental
1619
-- Portability : non-portable
1720
--
@@ -1713,6 +1716,8 @@ maximumBy = G.maximumBy
17131716
-- (2,'a')
17141717
-- >>> V.maximumOn fst $ V.fromList [(1,'a'), (1,'b')]
17151718
-- (1,'a')
1719+
--
1720+
-- @since 0.13.0.0
17161721
maximumOn :: Ord b => (a -> b) -> Vector a -> a
17171722
{-# INLINE maximumOn #-}
17181723
maximumOn = G.maximumOn
@@ -1761,6 +1766,8 @@ minimumBy = G.minimumBy
17611766
-- (1,'b')
17621767
-- >>> V.minimumOn fst $ V.fromList [(1,'a'), (1,'b')]
17631768
-- (1,'a')
1769+
--
1770+
-- @since 0.13.0.0
17641771
minimumOn :: Ord b => (a -> b) -> Vector a -> a
17651772
{-# INLINE minimumOn #-}
17661773
minimumOn = G.minimumOn

vector/src/Data/Vector/Fusion/Bundle.hs

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,12 @@
55
-- |
66
-- Module : Data.Vector.Fusion.Bundle
77
-- Copyright : (c) Roman Leshchinskiy 2008-2010
8+
-- Alexey Kuleshevich 2020-2022
9+
-- Aleksey Khudyakov 2020-2022
10+
-- Andrew Lelechenko 2020-2022
811
-- License : BSD-style
912
--
10-
-- Maintainer : Roman Leshchinskiy <[email protected]>
13+
-- Maintainer : Haskell Libraries Team <[email protected]>
1114
-- Stability : experimental
1215
-- Portability : non-portable
1316
--

vector/src/Data/Vector/Fusion/Bundle/Monadic.hs

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,9 +10,12 @@
1010
-- |
1111
-- Module : Data.Vector.Fusion.Bundle.Monadic
1212
-- Copyright : (c) Roman Leshchinskiy 2008-2010
13+
-- Alexey Kuleshevich 2020-2022
14+
-- Aleksey Khudyakov 2020-2022
15+
-- Andrew Lelechenko 2020-2022
1316
-- License : BSD-style
1417
--
15-
-- Maintainer : Roman Leshchinskiy <[email protected]>
18+
-- Maintainer : Haskell Libraries Team <[email protected]>
1619
-- Stability : experimental
1720
-- Portability : non-portable
1821
--

vector/src/Data/Vector/Fusion/Bundle/Size.hs

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,12 @@
11
-- |
22
-- Module : Data.Vector.Fusion.Bundle.Size
33
-- Copyright : (c) Roman Leshchinskiy 2008-2010
4+
-- Alexey Kuleshevich 2020-2022
5+
-- Aleksey Khudyakov 2020-2022
6+
-- Andrew Lelechenko 2020-2022
47
-- License : BSD-style
58
--
6-
-- Maintainer : Roman Leshchinskiy <[email protected]>
9+
-- Maintainer : Haskell Libraries Team <[email protected]>
710
-- Stability : experimental
811
-- Portability : portable
912
--

vector/src/Data/Vector/Fusion/Stream/Monadic.hs

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,12 @@
11
-- |
22
-- Module : Data.Vector.Fusion.Stream.Monadic
33
-- Copyright : (c) Roman Leshchinskiy 2008-2010
4+
-- Alexey Kuleshevich 2020-2022
5+
-- Aleksey Khudyakov 2020-2022
6+
-- Andrew Lelechenko 2020-2022
47
-- License : BSD-style
58
--
6-
-- Maintainer : Roman Leshchinskiy <[email protected]>
9+
-- Maintainer : Haskell Libraries Team <[email protected]>
710
-- Stability : experimental
811
-- Portability : non-portable
912
--

0 commit comments

Comments
 (0)