packages feed

these-lens 1.0.0.1 → 1.0.1

raw patch · 3 files changed

+19/−4 lines, 3 filesdep ~base

Dependency ranges changed: base

Files

CHANGELOG.md view
@@ -1,3 +1,7 @@+# 1.0.1++- Add `Each These` instance+ # 1.0.0.1  - Drop `base-compat` dependency
src/Data/These/Lens.hs view
@@ -1,4 +1,8 @@-{-# LANGUAGE Trustworthy #-}+{-# LANGUAGE FlexibleInstances     #-}+{-# LANGUAGE MultiParamTypeClasses #-}+{-# LANGUAGE Trustworthy           #-}+{-# LANGUAGE TypeFamilies          #-}+{-# LANGUAGE UndecidableInstances  #-} {-# OPTIONS_GHC -fno-warn-orphans #-} module Data.These.Lens (     -- * Traversals@@ -8,10 +12,11 @@     _This, _That, _These,     ) where -import Control.Applicative (pure, (<$>))+import Control.Applicative (pure, (<$>), (<*>)) import Prelude             (Either (..), flip, uncurry, ($), (.)) -import Control.Lens           (Prism', Swapped (..), Traversal, iso, prism)+import Control.Lens+       (Each (..), Prism', Swapped (..), Traversal, iso, prism) import Data.These import Data.These.Combinators (swapThese) @@ -80,3 +85,9 @@  instance Swapped These where     swapped = iso swapThese swapThese++-- | @since 1.0.1+instance (a ~ a', b ~ b') => Each (These a a') (These b b') a b where+    each f (This a)    = This <$> f a+    each f (That b)    = This <$> f b+    each f (These a b) = These <$> f a <*> f b
these-lens.cabal view
@@ -1,6 +1,6 @@ cabal-version:      >=1.10 name:               these-lens-version:            1.0.0.1+version:            1.0.1 synopsis:           Lenses for These homepage:           https://github.com/isomorphism/these license:            BSD3