packages feed

genvalidity-scientific 0.2.1.1 → 1.0.0.0

raw patch · 6 files changed

+46/−32 lines, 6 filesdep ~genvaliditysetup-changedPVP ok

version bump matches the API change (PVP)

Dependency ranges changed: genvalidity

API changes (from Hackage documentation)

- Data.GenValidity.Scientific: instance Data.GenValidity.GenUnchecked Data.Scientific.Scientific

Files

+ CHANGELOG.md view
@@ -0,0 +1,21 @@+# Changelog+++## [1.0.0.0] - 2021-11-20++### Changed++* Compatibility with `genvalidity >= 1.0.0.0`++## [0.2.1.1] - 2020-02-10++### Changed++* Improved the cabal file+* Removed the shrinking test++## [0.2.1.0] - 2018-10-06++### Changed++* `shrinkUnchecked` now does not shrink a `Scientific` to itself anymore
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-scientific.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: de155b1f1123c26f334ceafa7cefb982d4eb827e66d0afacc711cf355ffa260d  name:           genvalidity-scientific-version:        0.2.1.1+version:        1.0.0.0 synopsis:       GenValidity support for Scientific 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 >=4.7 && <5-    , genvalidity >=0.5+    , genvalidity >=1.0     , scientific     , validity >=0.5     , validity-scientific >=0.2
src/Data/GenValidity/Scientific.hs view
@@ -1,23 +1,18 @@ {-# OPTIONS_GHC -fno-warn-orphans #-}-{-# LANGUAGE CPP #-}  module Data.GenValidity.Scientific where-import Data.List-#if !MIN_VERSION_base(4,8,0)-import Control.Applicative ((<*>))-import Data.Functor ((<$>))-#endif+ import Data.GenValidity+import Data.List import Data.Scientific import Data.Validity.Scientific () -instance GenUnchecked Scientific where-    genUnchecked = scientific <$> genUnchecked <*> genUnchecked-    shrinkUnchecked s =-        nub $+instance GenValid Scientific where+  genValid = scientific <$> genValid <*> genValid+  shrinkValid s =+    filter isValid $+      nub $         filter (/= s) $-        [ scientific c e-        | (c, e) <- shrinkUnchecked (coefficient s, base10Exponent s)-        ]--instance GenValid Scientific+          [ scientific c e+            | (c, e) <- shrinkValid (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.Validity+  ( spec,+  )+where  import Data.GenValidity.Scientific ()- import Data.Scientific+import Test.Hspec+import Test.Validity  spec :: Spec spec = do   genValidSpec @Scientific-    -- shrinkValidSpec @Scientific++-- shrinkValidSpec @Scientific