packages feed

nonempty-vector 0.0.1.0 → 0.0.1.1

raw patch · 4 files changed

+29/−12 lines, 4 filesdep ~primitivedep ~semigroupsPVP: minor bump suggested

API additions: PVP suggests at least a minor version bump

Dependency ranges changed: primitive, semigroups

API changes (from Hackage documentation)

+ Data.Vector.NonEmpty.Mutable: fromMVector :: MVector s a -> Maybe (NonEmptyMVector s a)
+ Data.Vector.NonEmpty.Mutable: toMVector :: NonEmptyMVector s a -> MVector s a

Files

CHANGELOG.md view
@@ -1,5 +1,10 @@ # Revision history for nonempty-vector -## 0.1.0.0 -- YYYY-mm-dd+## 0.0.1.1 -- 2019-10-20++* Export `toMVector` and `fromMVector`+* clean up docs++## 0.0.1.0 -- 2019-10-20  * First version. Released on an unsuspecting world.
README.md view
@@ -1,6 +1,6 @@ # Non-empty Vectors -[![Build Status](https://travis-ci.org/emilypi/nonempty-vector.svg?branch=master)](https://travis-ci.org/emilypi/nonempty-vector)+[![Build Status](https://travis-ci.org/emilypi/nonempty-vector.svg?branch=master)](https://travis-ci.org/emilypi/nonempty-vector) [![Hackage](https://img.shields.io/hackage/v/nonempty-vector.svg)](https://hackage.haskell.org/package/nonempty-vector)  This package presents thin wrappers around mutable and immutable [Data.Vector](https://hackage.haskell.org/package/vector) types. The entire Vector API is supported for both sets of boxed vectors, with future plans to support unboxed, primitive, storable, and generic vectors. 
nonempty-vector.cabal view
@@ -1,6 +1,6 @@ cabal-version:       2.4 name:                nonempty-vector-version:             0.0.1.0+version:             0.0.1.1 synopsis:            Non-empty vectors description:   Performant non-empty mutable and immutable vectors. These vectors strive to implement@@ -30,11 +30,11 @@   exposed-modules:     Data.Vector.NonEmpty                      , Data.Vector.NonEmpty.Mutable -  build-depends:       base       >=4.0  && <5+  build-depends:       base        >=4.9  && <5                      , deepseq-                     , primitive  >=0.7-                     , semigroups >=0.19 && <0.20-                     , vector     >=0.12 && <0.13+                     , primitive  ^>=0.6+                     , semigroups  >=0.17 && <0.19+                     , vector     ^>=0.12    hs-source-dirs:      src   default-language:    Haskell2010@@ -48,8 +48,8 @@   main-is:             NEVectorTests.hs   ghc-options:         -Wall -threaded -rtsopts -with-rtsopts=-N -  build-depends:       base             >=4.0  && <5+  build-depends:       base             >=4.9  && <5                      , nonempty-vector-                     , hedgehog        ^>=1.0-                     , semigroups      ^>=0.19+                     , hedgehog         >=0.6  && <1.1+                     , semigroups       >=0.17 && <0.19                      , vector          ^>=0.12
src/Data/Vector/NonEmpty/Mutable.hs view
@@ -29,7 +29,8 @@   -- ** Overlapping , overlaps -  -- * Construction+  -- ** Conversions+, fromMVector, toMVector    -- ** Initialisation , new, unsafeNew, replicate, replicateM, clone@@ -164,11 +165,22 @@ {-# INLINE overlaps #-}  -- ---------------------------------------------------------------------- ----- Initialisation+-- Conversion +-- | Convert a mutable vector to a non-empty mutable vector+-- fromMVector :: MVector s a -> Maybe (NonEmptyMVector s a) fromMVector v = if M.null v then Nothing else Just (NonEmptyMVector v) +-- | Convert a non-empty mutable vector to a mutable vector+--+toMVector :: NonEmptyMVector s a -> MVector s a+toMVector = _nemVec++-- ---------------------------------------------------------------------- --+-- Initialisation++-- | -- | Create a mutable vector of the given length. -- new