packages feed

validity-containers 0.5.0.3 → 0.5.0.4

raw patch · 3 files changed

+21/−10 lines, 3 filesdep ~containers

Dependency ranges changed: containers

Files

CHANGELOG.md view
@@ -1,5 +1,11 @@ # Changelog +## [0.5.0.4] - 2020-06-17++### Added++* `distinctOrd`+ ## [0.5.0.3] - 2020-04-23  ### Changed
src/Data/Validity/Set.hs view
@@ -1,17 +1,22 @@+{-# LANGUAGE CPP #-} {-# OPTIONS_GHC -fno-warn-orphans #-}  module Data.Validity.Set where -import Data.Validity-+import Data.Containers.ListUtils import Data.Set (Set) import qualified Data.Set as S+import Data.Validity  -- | A 'Set' of things is valid if all the elements are valid and the 'Set' itself -- is valid. instance (Ord v, Validity v) => Validity (Set v) where-    validate s =-        mconcat-            [ declare "The set structure is valid." $ S.valid s-            , annotate (S.toList s) "Set elements"-            ]+  validate s =+    mconcat+      [ declare "The set structure is valid." $ S.valid s,+        annotate (S.toList s) "Set elements"+      ]+#if MIN_VERSION_containers(0,6,0)+distinctOrd :: Ord a => [a] -> Bool+distinctOrd ls = nubOrd ls == ls+#endif
validity-containers.cabal view
@@ -4,10 +4,10 @@ -- -- see: https://github.com/sol/hpack ----- hash: 3adf3a60a7a251b920837101acdb564502883371a5b6ba8f41c32dafe926f0ff+-- hash: 2e970343bc40866f2768fe78bd9427b658402d4bf787b23ad793a1cae658a82f  name:           validity-containers-version:        0.5.0.3+version:        0.5.0.4 synopsis:       Validity instances for containers category:       Validity homepage:       https://github.com/NorfairKing/validity#readme@@ -38,6 +38,6 @@       src   build-depends:       base >=4.7 && <5-    , containers+    , containers >=0.6.0.1     , validity >=0.5   default-language: Haskell2010