packages feed

profunctor-arrows 0.0.0.2 → 0.0.0.3

raw patch · 2 files changed

+7/−45 lines, 2 filesdep +lawzPVP: major bump suggested

API removals or changes: PVP suggests a major version bump

Dependencies added: lawz

API changes (from Hackage documentation)

- Data.Profunctor.Extra: infixr 5 +
- Data.Profunctor.Extra: apply :: (b -> a, b) -> a
+ Data.Profunctor.Extra: apply :: () => (b -> a, b) -> a
- Data.Profunctor.Extra: eswap :: (a1 + a2) -> a2 + a1
+ Data.Profunctor.Extra: eswap :: () => (a1 + a2) -> a2 + a1
- Data.Profunctor.Extra: eval :: (a, a -> b) -> b
+ Data.Profunctor.Extra: eval :: () => (a, a -> b) -> b
- Data.Profunctor.Extra: fork :: a -> (a, a)
+ Data.Profunctor.Extra: fork :: () => a -> (a, a)
- Data.Profunctor.Extra: join :: (a + a) -> a
+ Data.Profunctor.Extra: join :: () => (a + a) -> a
- Data.Profunctor.Extra: lft :: (b -> a) -> (a + b) -> a
+ Data.Profunctor.Extra: lft :: () => (b -> a) -> (a + b) -> a
- Data.Profunctor.Extra: lft' :: (a + Void) -> a
+ Data.Profunctor.Extra: lft' :: () => (a + Void) -> a
- Data.Profunctor.Extra: rgt :: (a -> b) -> (a + b) -> b
+ Data.Profunctor.Extra: rgt :: () => (a -> b) -> (a + b) -> b
- Data.Profunctor.Extra: rgt' :: (Void + b) -> b
+ Data.Profunctor.Extra: rgt' :: () => (Void + b) -> b

Files

profunctor-arrows.cabal view
@@ -1,12 +1,12 @@ cabal-version: >= 1.10  name:           profunctor-arrows-version:        0.0.0.2+version:        0.0.0.3 synopsis:       Profunctor arrows description:    Free prearrows and arrows for profunctors. category:       Data, Profunctors-homepage:       https://github.com/cmk/profunctor-extras-bug-reports:    https://github.com/cmk/profunctor-extras/issues+homepage:       https://github.com/cmk/profunctor-optics+bug-reports:    https://github.com/cmk/profunctor-optics/issues author:         Chris McKinlay maintainer:     Chris McKinlay copyright:      2019 Chris McKinlay@@ -17,7 +17,7 @@  source-repository head   type: git-  location: https://github.com/cmk/profunctor-extras+  location: https://github.com/cmk/profunctor-optics  library   exposed-modules:@@ -46,6 +46,7 @@   default-language: Haskell2010   ghc-options: -Wall   build-depends:-      base              >= 4.9   && <5.0+      base              >= 4.9   && < 5.0+    , lawz              >= 0.1.1 && < 1.0     , comonad           >= 4     && < 6     , profunctors       >= 5.3   && < 6
src/Data/Profunctor/Extra.hs view
@@ -69,49 +69,10 @@ import Data.Profunctor.Sieve import Data.Tuple (swap) import Data.Void+import Test.Logic import Prelude import qualified Control.Category as C (id) import qualified Control.Monad as M (join)--infixr 5 +--type (+) = Either--rgt :: (a -> b) -> a + b -> b-rgt f = either f id-{-# INLINE rgt #-}--rgt' :: Void + b -> b-rgt' = rgt absurd -{-# INLINE rgt' #-}--lft :: (b -> a) -> a + b -> a-lft f = either id f-{-# INLINE lft #-}--lft' :: a + Void -> a-lft' = lft absurd-{-# INLINE lft' #-}--eswap :: (a1 + a2) -> (a2 + a1)-eswap = Right ||| Left-{-# INLINE eswap #-}--fork :: a -> (a , a)-fork = M.join (,)-{-# INLINE fork #-}--join :: (a + a) -> a-join = M.join either id-{-# INLINE join #-}--eval :: (a , a -> b) -> b-eval = uncurry $ flip id-{-# INLINE eval #-}--apply :: (b -> a , b) -> a-apply = uncurry id-{-# INLINE apply #-}  coeval :: b -> (b -> a) + a -> a coeval b = either ($ b) id