genvalidity-vector 0.3.0.1 → 1.0.0.0
raw patch · 6 files changed
+44/−36 lines, 6 filesdep ~genvaliditysetup-changedPVP ok
version bump matches the API change (PVP)
Dependency ranges changed: genvalidity
API changes (from Hackage documentation)
- Data.GenValidity.Vector: instance (Data.GenValidity.GenUnchecked v, Data.GenValidity.GenInvalid v) => Data.GenValidity.GenInvalid (Data.Vector.Vector v)
- Data.GenValidity.Vector: instance (Foreign.Storable.Storable e, Data.GenValidity.GenUnchecked e) => Data.GenValidity.GenUnchecked (Data.Vector.Storable.Vector e)
- Data.GenValidity.Vector: instance Data.GenValidity.GenUnchecked v => Data.GenValidity.GenUnchecked (Data.Vector.Vector v)
Files
- CHANGELOG.md +27/−0
- LICENSE +1/−1
- Setup.hs +0/−3
- genvalidity-vector.cabal +7/−6
- src/Data/GenValidity/Vector.hs +5/−21
- test/Test/Validity/VectorSpec.hs +4/−5
+ CHANGELOG.md view
@@ -0,0 +1,27 @@+# Changelog++## [1.0.0.0] - 2021-11-20++### Changed++* Compatibility with `genvalidity >= 1.0.0.0`++## [0.3.0.1] - 2020-02-10++### Changelog++* Improved the cabal file++## [0.3.0.0] - 2019-03-08++### Changelog++* Compatibility with genvalidity >=0.8++### Changed++## [0.2.0.3] - 2018-11-07++### Changed++* Compatibility with validity >=0.9 and genvalidity >= 0.7
LICENSE view
@@ -1,6 +1,6 @@ The MIT License (MIT) -Copyright (c) 2016-2020 Tom Sydney Kerckhove+Copyright (c) 2016-2021 Tom Sydney Kerckhove Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal
− Setup.hs
@@ -1,3 +0,0 @@-import Distribution.Simple--main = defaultMain
genvalidity-vector.cabal view
@@ -1,23 +1,24 @@ cabal-version: 1.12 --- This file has been generated from package.yaml by hpack version 0.33.0.+-- This file has been generated from package.yaml by hpack version 0.34.4. -- -- see: https://github.com/sol/hpack------ hash: bcc21b1fc4d1b530c7cac087e5da0265c2871bc97ffd5d9d26c917a5f69e8488 name: genvalidity-vector-version: 0.3.0.1+version: 1.0.0.0 synopsis: GenValidity support for vector category: Testing homepage: https://github.com/NorfairKing/validity#readme bug-reports: https://github.com/NorfairKing/validity/issues author: Tom Sydney Kerckhove maintainer: syd@cs-syd.eu-copyright: Copyright: (c) 2017-2020 Tom Sydney Kerckhove+copyright: Copyright: (c) 2016-2021 Tom Sydney Kerckhove license: MIT license-file: LICENSE build-type: Simple+extra-source-files:+ LICENSE+ CHANGELOG.md source-repository head type: git@@ -33,7 +34,7 @@ build-depends: QuickCheck , base <5- , genvalidity >=0.5+ , genvalidity >=1.0 , validity >=0.5 , validity-vector >=0.1 , vector
src/Data/GenValidity/Vector.hs view
@@ -1,32 +1,16 @@ {-# OPTIONS_GHC -fno-warn-orphans #-}-{-# LANGUAGE CPP #-} module Data.GenValidity.Vector where-#if !MIN_VERSION_base(4,8,0)-import Data.Functor ((<$>))-#endif+ import Data.GenValidity import Data.Validity.Vector ()- import qualified Data.Vector as V import qualified Data.Vector.Storable as SV -instance GenUnchecked v => GenUnchecked (V.Vector v) where- genUnchecked = V.fromList <$> genUnchecked- shrinkUnchecked = fmap V.fromList . shrinkUnchecked . V.toList- instance GenValid v => GenValid (V.Vector v) where- genValid = V.fromList <$> genValid- shrinkValid = fmap V.fromList . shrinkValid . V.toList--instance (GenUnchecked v, GenInvalid v) => GenInvalid (V.Vector v) where- genInvalid = V.fromList <$> genInvalid- shrinkInvalid = fmap V.fromList . shrinkInvalid . V.toList--instance (SV.Storable e, GenUnchecked e) => GenUnchecked (SV.Vector e) where- genUnchecked = SV.fromList <$> genUnchecked- shrinkUnchecked = fmap SV.fromList . shrinkUnchecked . SV.toList+ genValid = V.fromList <$> genValid+ shrinkValid = fmap V.fromList . shrinkValid . V.toList instance (SV.Storable e, GenValid e) => GenValid (SV.Vector e) where- genValid = SV.fromList <$> genValid- shrinkValid = fmap SV.fromList . shrinkValid . SV.toList+ genValid = SV.fromList <$> genValid+ shrinkValid = fmap SV.fromList . shrinkValid . SV.toList
test/Test/Validity/VectorSpec.hs view
@@ -2,15 +2,14 @@ module Test.Validity.VectorSpec where -import Test.Hspec- import Data.GenValidity.Vector () import qualified Data.Vector as V import qualified Data.Vector.Storable as SV+import Test.Hspec import Test.Validity.GenValidity spec :: Spec spec = do- genValidSpec @(V.Vector Int)- genValiditySpec @(V.Vector Rational)- genValidSpec @(SV.Vector Int)+ genValidSpec @(V.Vector Int)+ genValidSpec @(V.Vector Rational)+ genValidSpec @(SV.Vector Int)