dependency 1.2.0.0 → 1.2.0.1
raw patch · 2 files changed
+25/−29 lines, 2 filesdep −semigroupsdep ~basedep ~recursion-schemesPVP ok
version bump matches the API change (PVP)
Dependencies removed: semigroups
Dependency ranges changed: base, recursion-schemes
API changes (from Hackage documentation)
Files
- dependency.cabal +10/−24
- src/Data/Dependency/Type.hs +15/−5
dependency.cabal view
@@ -1,6 +1,6 @@ cabal-version: 1.18 name: dependency-version: 1.2.0.0+version: 1.2.0.1 license: BSD3 license-file: LICENSE copyright: Copyright: (c) 2018 Vanessa McHale@@ -26,7 +26,6 @@ library exposed-modules: Data.Dependency- build-tools: cpphs -any hs-source-dirs: src other-modules: Data.Dependency.Type@@ -35,10 +34,11 @@ default-language: Haskell2010 other-extensions: DeriveAnyClass DeriveGeneric OverloadedStrings DeriveFoldable DeriveFunctor DeriveGeneric DeriveTraversable- OverloadedStrings TemplateHaskell TypeFamilies TupleSections- ghc-options: -Wall+ OverloadedStrings TypeFamilies TupleSections+ ghc-options: -Wall -Wincomplete-uni-patterns+ -Wincomplete-record-updates -Wcompat build-depends:- base >=4.8 && <5,+ base >=4.11 && <5, ansi-wl-pprint -any, containers >=0.5.9, microlens -any,@@ -50,18 +50,10 @@ micro-recursion-schemes -any else build-depends:- recursion-schemes >=5.1- - if impl(ghc <8.0)- build-depends:- semigroups -any+ recursion-schemes >=5.0.1 - if (flag(development) && impl(ghc <8.4))+ if flag(development) ghc-options: -Werror- - if impl(ghc >=8.0)- ghc-options: -Wincomplete-uni-patterns -Wincomplete-record-updates- -Wcompat test-suite dependency-test type: exitcode-stdio-1.0@@ -70,6 +62,7 @@ default-language: Haskell2010 other-extensions: TupleSections ghc-options: -threaded -rtsopts -with-rtsopts=-N -Wall+ -Wincomplete-uni-patterns -Wincomplete-record-updates -Wcompat build-depends: base -any, dependency -any,@@ -78,10 +71,6 @@ if flag(development) ghc-options: -Werror- - if impl(ghc >=8.0)- ghc-options: -Wincomplete-uni-patterns -Wincomplete-record-updates- -Wcompat benchmark dependency-bench type: exitcode-stdio-1.0@@ -89,7 +78,8 @@ hs-source-dirs: bench default-language: Haskell2010 other-extensions: TupleSections- ghc-options: -Wall+ ghc-options: -Wall -Wincomplete-uni-patterns+ -Wincomplete-record-updates -Wcompat build-depends: base -any, dependency -any,@@ -98,7 +88,3 @@ if flag(development) ghc-options: -Werror- - if impl(ghc >=8.0)- ghc-options: -Wincomplete-uni-patterns -Wincomplete-record-updates- -Wcompat
src/Data/Dependency/Type.hs view
@@ -2,10 +2,8 @@ {-# LANGUAGE DeriveFoldable #-} {-# LANGUAGE DeriveFunctor #-} {-# LANGUAGE DeriveGeneric #-}-{-# LANGUAGE DeriveTraversable #-} {-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE PatternSynonyms #-}-{-# LANGUAGE TemplateHaskell #-} {-# LANGUAGE TypeFamilies #-} module Data.Dependency.Type ( Dependency (..)@@ -19,10 +17,8 @@ import Control.DeepSeq (NFData) import Data.Binary import Data.Functor.Foldable-import Data.Functor.Foldable.TH import Data.List (intercalate) import qualified Data.Map as M-import Data.Semigroup import qualified Data.Set as S import GHC.Generics (Generic) import GHC.Natural (Natural)@@ -82,7 +78,21 @@ satisfies (Bounded x y) z = satisfies x z && satisfies y z satisfies None _ = True -makeBaseFunctor ''Constraint+data ConstraintF a x = LessThanEqF a+ | GreaterThanEqF a+ | EqF a+ | BoundedF x x+ | NoneF+ deriving (Functor)++type instance Base (Constraint a) = ConstraintF a++instance Recursive (Constraint a) where+ project (LessThanEq x) = LessThanEqF x+ project (GreaterThanEq x) = GreaterThanEqF x+ project (Eq x) = EqF x+ project (Bounded x y) = BoundedF x y+ project None = NoneF instance Pretty a => Pretty (Constraint a) where pretty = cata a where