packages feed

semi-iso 0.1.0.0 → 0.2.0.0

raw patch · 2 files changed

+23/−6 lines, 2 filesdep ~basePVP ok

version bump matches the API change (PVP)

Dependency ranges changed: base

API changes (from Hackage documentation)

+ Control.Lens.SemiIso: exact :: Eq a => a -> SemiIso' () a
- Control.Lens.SemiIso: constant :: Eq a => a -> SemiIso' () a
+ Control.Lens.SemiIso: constant :: a -> SemiIso' () a

Files

Control/Lens/SemiIso.hs view
@@ -52,7 +52,8 @@     unit,     swapped,     associated,-    constant+    constant,+    exact     ) where  import Control.Lens.Internal.SemiIso@@ -114,10 +115,22 @@  -- | \-> Always returns the argument. --+-- \<- Maps everything to a @()@.+--+-- Note that this isn't an @Iso'@ because+--+-- > unapply (constant x) >=> apply (constant x) /= id+--+-- But SemiIso laws do hold.+constant :: a -> SemiIso' () a+constant x = semiIso (\_ -> Right x) (\_ -> Right ())++-- | \-> Always returns the argument.+-- -- \<- Filters out all values not equal to the argument.-constant :: Eq a => a -> SemiIso' () a-constant x = semiIso f g+exact :: Eq a => a -> SemiIso' () a+exact x = semiIso f g   where     f _ = Right x     g y | x == y    = Right ()-        | otherwise = Left "constant: not equal"+        | otherwise = Left "exact: not equal"
semi-iso.cabal view
@@ -1,5 +1,5 @@ name:                semi-iso-version:             0.1.0.0+version:             0.2.0.0 synopsis:            Weakened partial isomorphisms that work with lenses. description:         Semi-isomorphisms are partial isomorphisms with weakened iso laws.                      And they work with Iso and Prism from @lens@!@@ -15,9 +15,13 @@ build-type:          Simple cabal-version:       >=1.10 +source-repository head+  type:     git+  location: git@github.com:Pawel834/semi-iso.git+ library   exposed-modules:     Control.Lens.SemiIso                        Control.Lens.Internal.SemiIso                        Data.SemiIsoFunctor-  build-depends:       base >=4.7 && <4.8, profunctors, transformers, lens+  build-depends:       base >= 4 && < 5, profunctors, transformers, lens   default-language:    Haskell2010