summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorConalElliott <>2012-10-05 17:51:14 (GMT)
committerhdiff <hdiff@luite.com>2012-10-05 17:51:14 (GMT)
commit215730044801d9f572de4851c2df24fccce193bd (patch)
tree4ca5029ca4465e1a152c12a34afd0731c5bf5805
parent98e173007af99b7009a4f208f874e7140af218b5 (diff)
version 0.9.50.9.5
-rw-r--r--TypeCompose.cabal2
-rw-r--r--src/Control/Compose.hs12
2 files changed, 11 insertions, 3 deletions
diff --git a/TypeCompose.cabal b/TypeCompose.cabal
index f38ade2..dcb1b32 100644
--- a/TypeCompose.cabal
+++ b/TypeCompose.cabal
@@ -1,5 +1,5 @@
Name: TypeCompose
-Version: 0.9.4
+Version: 0.9.5
Synopsis: Type composition classes & instances
Category: Composition, Control
Description:
diff --git a/src/Control/Compose.hs b/src/Control/Compose.hs
index f3100a0..0f5834d 100644
--- a/src/Control/Compose.hs
+++ b/src/Control/Compose.hs
@@ -55,9 +55,9 @@ module Control.Compose
, 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 @@ instance Traversable Id where
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
@@ -759,6 +763,10 @@ instance (Applicative f, Applicative g) => Applicative (f :*: g) where
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).
-- instance (Show (f a b, g a b)) => Show ((f ::*:: g) a b) where