genvalidity-scientific 0.2.0.1 → 0.2.1.0
raw patch · 3 files changed
+21/−17 lines, 3 filesPVP ok
version bump matches the API change (PVP)
API changes (from Hackage documentation)
Files
- genvalidity-scientific.cabal +12/−11
- src/Data/GenValidity/Scientific.hs +3/−0
- test/Data/GenValidity/ScientificSpec.hs +6/−6
genvalidity-scientific.cabal view
@@ -1,18 +1,19 @@--- This file has been generated from package.yaml by hpack version 0.20.0.+-- This file has been generated from package.yaml by hpack version 0.28.2. -- -- see: https://github.com/sol/hpack ----- hash: ab490d7da718d08c9dd87c3c13e830b04072a545b337474edcf02023f45d0bd5+-- hash: 30fcf5a27de0b88d2c4cc9919bbbececea724a68019af2fac13002b1ac264bce name: genvalidity-scientific-version: 0.2.0.1+version: 0.2.1.0 synopsis: GenValidity support for Scientific description: Please see README.md category: Testing homepage: https://github.com/NorfairKing/validity#readme bug-reports: https://github.com/NorfairKing/validity/issues author: Tom Sydney Kerckhove-maintainer: syd.kerckhove@gmail.com+maintainer: syd.kerckhove@gmail.com,+ nick.van.den.broeck666@gmail.com copyright: Copyright: (c) 2017-2018 Tom Sydney Kerckhove license: MIT license-file: LICENSE@@ -24,6 +25,10 @@ location: https://github.com/NorfairKing/validity library+ exposed-modules:+ Data.GenValidity.Scientific+ other-modules:+ Paths_genvalidity_scientific hs-source-dirs: src build-depends:@@ -33,15 +38,14 @@ , scientific , validity >=0.5 , validity-scientific >=0.2- exposed-modules:- Data.GenValidity.Scientific- other-modules:- Paths_genvalidity_scientific default-language: Haskell2010 test-suite genvalidity-scientific-test type: exitcode-stdio-1.0 main-is: Spec.hs+ other-modules:+ Data.GenValidity.ScientificSpec+ Paths_genvalidity_scientific hs-source-dirs: test ghc-options: -threaded -rtsopts -with-rtsopts=-N -Wall -fno-warn-name-shadowing@@ -53,7 +57,4 @@ , genvalidity-scientific , hspec , scientific- other-modules:- Data.GenValidity.ScientificSpec- Paths_genvalidity_scientific default-language: Haskell2010
src/Data/GenValidity/Scientific.hs view
@@ -2,6 +2,7 @@ {-# LANGUAGE CPP #-} module Data.GenValidity.Scientific where+import Data.List #if !MIN_VERSION_base(4,8,0) import Control.Applicative ((<*>)) import Data.Functor ((<$>))@@ -13,6 +14,8 @@ instance GenUnchecked Scientific where genUnchecked = scientific <$> genUnchecked <*> genUnchecked shrinkUnchecked s =+ nub $+ filter (/= s) $ [ scientific c e | (c, e) <- shrinkUnchecked (coefficient s, base10Exponent s) ]
test/Data/GenValidity/ScientificSpec.hs view
@@ -1,17 +1,17 @@+{-# LANGUAGE TypeApplications #-}+ module Data.GenValidity.ScientificSpec ( spec ) where import Test.Hspec-import Test.QuickCheck+import Test.Validity -import Data.GenValidity import Data.GenValidity.Scientific () import Data.Scientific spec :: Spec-spec =- describe "genValid" $- it "generates valid Scientific's" $- forAll (genValid :: Gen Scientific) isValid+spec = do+ genValidSpec @Scientific+ shrinkValidSpec @Scientific