packages feed

TypeCompose 0.9.3 → 0.9.4

raw patch · 2 files changed

+13/−4 lines, 2 files

Files

TypeCompose.cabal view
@@ -1,5 +1,5 @@ Name:                TypeCompose-Version:             0.9.3+Version:             0.9.4 Synopsis: 	     Type composition classes & instances Category:            Composition, Control Description:
src/Control/Compose.hs view
@@ -29,7 +29,7 @@   -- * Value transformers     Unop, Binop   -- * Specialized semantic editor combinators-  , result, argument, (~>), (~>*)+  , result, argument, (~>), (~>*), (<~), (*<~)   -- * Contravariant functors   , ContraFunctor(..), bicomap   -- * Unary\/unary composition@@ -121,6 +121,7 @@ result = (.)  infixr 1 ~>, ~>*+infixl 1 <~, *<~  -- | Add pre- and post processing (~>) :: Category (-->) =>@@ -128,6 +129,10 @@ -- (f ~> h) g = h . g . f f ~> h = result h . argument f +(<~) :: Category (-->) =>+        (b --> b') -> (a' --> a) -> ((a --> b) -> (a' --> b'))+(<~) = flip (~>)+ -- If I add argument back to DeepArrow, we can get a different generalization: --  -- (~>) :: DeepArrow (-->) => (a' --> a) -> (b --> b') -> ((a -> b) --> (a' -> b'))@@ -137,8 +142,12 @@          (a' -> a) -> (b -> b') -> (p a -> q b) -> (p a' -> q b') f ~>* g = fmap f ~> fmap g --- (~>*) could be generalized to other categories (beside functions) if we use a--- more general Functor, as in the "categories" package.+(*<~) :: (Functor p, Functor q) => +         (b -> b') -> (a' -> a) -> (p a -> q b) -> (p a' -> q b')+(*<~) = flip (~>*)++-- (~>*) and (*<~) could be generalized to other categories (beside functions)+-- if we use a more general Functor, as in the "categories" package.  {----------------------------------------------------------     Contravariant functors