TypeCompose 0.9.4 → 0.9.5
raw patch · 2 files changed
+11/−3 lines, 2 files
Files
- TypeCompose.cabal +1/−1
- src/Control/Compose.hs +10/−2
TypeCompose.cabal view
@@ -1,5 +1,5 @@ Name: TypeCompose-Version: 0.9.4+Version: 0.9.5 Synopsis: Type composition classes & instances Category: Composition, Control Description:
src/Control/Compose.hs view
@@ -55,9 +55,9 @@ , Id(..),unId, biId, inId, inId2 -- * Constructor pairing -- ** Unary- , (:*:)(..), biProd, convProd, (***#), ($*), inProd, inProd2, inProd3+ , (:*:)(..),(*:*), biProd, convProd, (***#), ($*), inProd, inProd2, inProd3 -- * Binary- , (::*::)(..), inProdd, inProdd2+ , (::*::)(..), (*::*), inProdd, inProdd2 -- * Arrow between /two/ constructor applications , Arrw(..), (:->:) , biFun, convFun, inArrw, inArrw2, inArrw3@@ -685,6 +685,10 @@ newtype (f :*: g) a = Prod { unProd :: (f a, g a) } -- deriving (Show, Eq, Ord) +-- | Handy infix & curried 'Prod'+(*:*) :: f a -> g a -> (f :*: g) a+(*:*) = curry Prod+ -- | @newtype@ bijection biProd :: (f a, g a) :<->: (f :*: g) a biProd = Bi Prod unProd@@ -758,6 +762,10 @@ -- | Pairing of binary type constructors newtype (f ::*:: g) a b = Prodd { unProdd :: (f a b, g a b) } deriving (Show, Eq, Ord)++-- | Handy infix & curried 'Prodd'+(*::*) :: f a b -> g a b -> (f ::*:: g) a b+(*::*) = curry Prodd -- -- Remove the next three when GHC can derive them (6.8).