packages feed

exhaustive 1.1.1 → 1.1.2

raw patch · 3 files changed

+9/−5 lines, 3 filesdep ~generics-sopPVP: major bump suggested

API removals or changes: PVP suggests a major version bump

Dependency ranges changed: generics-sop

API changes (from Hackage documentation)

- Control.Exhaustive: finish :: NP f []
+ Control.Exhaustive: finish :: NP f '[]
- Control.Exhaustive: produceAll :: (code ~ Code a, SingI code, Generic a, Alternative f) => NP (ConstructorApplication f code) code -> f [a]
+ Control.Exhaustive: produceAll :: (code ~ Code a, Generic a, Alternative f) => NP (ConstructorApplication f code) code -> f [a]
- Control.Exhaustive: produceFirst :: (code ~ Code a, SingI code, Generic a, Alternative f) => NP (ConstructorApplication f code) code -> f a
+ Control.Exhaustive: produceFirst :: (code ~ Code a, Generic a, Alternative f) => NP (ConstructorApplication f code) code -> f a
- Control.Exhaustive: produceM :: (code ~ Code a, SingI code, Generic a, Applicative f) => NP (ConstructorApplication f code) code -> [f a]
+ Control.Exhaustive: produceM :: (code ~ Code a, Generic a, Applicative f) => NP (ConstructorApplication f code) code -> [f a]

Files

Changelog.md view
@@ -1,3 +1,7 @@+## 1.1.2++* Compile with generics-sop 0.2. Thanks to @kosmikus for this change.+ ## 1.1.1  * Increased the upper-bound of base to allow < 4.9 and transforms < 0.5. Now builds on
exhaustive.cabal view
@@ -1,5 +1,5 @@ name:                exhaustive-version:             1.1.1+version:             1.1.2 synopsis:            Compile time checks that a computation considers producing data through all possible constructors description: For a brief tutorial to @exhaustive@, check out the documentation for "Control.Exhaustive", which contains a small example. homepage:            http://github.com/ocharles/exhaustive@@ -21,7 +21,7 @@   exposed-modules:     Control.Exhaustive   -- other-modules:   other-extensions:    ConstraintKinds, FlexibleContexts, FlexibleInstances, FunctionalDependencies, GADTs, RankNTypes, ScopedTypeVariables, TypeFamilies, TypeOperators, UndecidableInstances-  build-depends:       base >=4.7 && <4.9, generics-sop >=0.1 && <0.2, transformers >=0.3 && <0.5, template-haskell+  build-depends:       base >=4.7 && <4.9, generics-sop >=0.1 && <0.3, transformers >=0.3 && <0.5, template-haskell   hs-source-dirs:      src   default-language:    Haskell2010   ghc-options: -Wall
src/Control/Exhaustive.hs view
@@ -283,7 +283,7 @@ -- first constructor to successfully be constructed (in the order defined in the -- original data type) will be returned, or 'empty' if all constructions fail. produceFirst-  :: (code ~ Code a, SingI code, Generic a, Alternative f)+  :: (code ~ Code a, Generic a, Alternative f)   => NP (ConstructorApplication f code) code -> f a produceFirst = asum . produceM @@ -291,13 +291,13 @@ -- fail, they will not be included in the resulting list. If all constructors -- fail, this will return 'pure' @[]@. produceAll-  :: (code ~ Code a, SingI code, Generic a, Alternative f)+  :: (code ~ Code a, Generic a, Alternative f)   => NP (ConstructorApplication f code) code -> f [a] produceAll = fmap catMaybes . sequenceA . map optional . produceM  -- | Build a list of computations, one for each constructor in a data type. produceM-  :: (code ~ Code a, SingI code, Generic a, Applicative f)+  :: (code ~ Code a, Generic a, Applicative f)   => NP (ConstructorApplication f code) code   -> [f a] produceM fs =