Lifted product of functors.
Examples
fmap (+1) (Pair [1, 2, 3] (Just 0))Pair [2,3,4] (Just 1)
Pair "Hello, " (Left 'x') <> Pair "World" (Right 'y')Pair "Hello, World" (Right 'y')
Constructors
Pair (f a) (g a)
Instances28Generic1, Monad, Functor, MonadFix, Applicative, Foldable, …
Generic1 (Product f g)Defined in base-4.20.2.0 · Data.Functor.Product(Monad f, Monad g) => Monad (Product f g)Defined in base-4.20.2.0 · Data.Functor.Product(Functor f, Functor g) => Functor (Product f g)Defined in base-4.20.2.0 · Data.Functor.Product(MonadFix f, MonadFix g) => MonadFix (Product f g)Defined in base-4.20.2.0 · Data.Functor.Product(Applicative f, Applicative g) => Applicative (Product f g)Defined in base-4.20.2.0 · Data.Functor.Product(Foldable f, Foldable g) => Foldable (Product f g)Defined in base-4.20.2.0 · Data.Functor.Product(Traversable f, Traversable g) => Traversable (Product f g)Defined in base-4.20.2.0 · Data.Functor.Product(Alternative f, Alternative g) => Alternative (Product f g)Defined in base-4.20.2.0 · Data.Functor.Product(MonadPlus f, MonadPlus g) => MonadPlus (Product f g)Defined in base-4.20.2.0 · Data.Functor.Product(MonadZip f, MonadZip g) => MonadZip (Product f g)Defined in base-4.20.2.0 · Data.Functor.Product(Foldable1 f, Foldable1 g) => Foldable1 (Product f g)Defined in base-4.20.2.0 · Data.Foldable1(Eq1 f, Eq1 g) => Eq1 (Product f g)Defined in base-4.20.2.0 · Data.Functor.Product(Ord1 f, Ord1 g) => Ord1 (Product f g)Defined in base-4.20.2.0 · Data.Functor.Product(Read1 f, Read1 g) => Read1 (Product f g)Defined in base-4.20.2.0 · Data.Functor.Product(Show1 f, Show1 g) => Show1 (Product f g)Defined in base-4.20.2.0 · Data.Functor.Product(Contravariant f, Contravariant g) => Contravariant (Product f g)Defined in base-4.20.2.0 · Data.Functor.Contravariant(NFData1 f, NFData1 g) => NFData1 (Product f g)Defined in deepseq-1.5.0.0 · Control.DeepSeq(Eq (f a), Eq (g a)) => Eq (Product f g a)Defined in base-4.20.2.0 · Data.Functor.Product(Typeable a, Typeable f, Typeable g, Typeable k, Data (f a), Data (g a)) => Data (Product f g a)Defined in base-4.20.2.0 · Data.Functor.Product(Ord (f a), Ord (g a)) => Ord (Product f g a)Defined in base-4.20.2.0 · Data.Functor.Product(Read (f a), Read (g a)) => Read (Product f g a)Defined in base-4.20.2.0 · Data.Functor.Product(Show (f a), Show (g a)) => Show (Product f g a)Defined in base-4.20.2.0 · Data.Functor.ProductGeneric (Product f g a)Defined in base-4.20.2.0 · Data.Functor.Product(Semigroup (f a), Semigroup (g a)) => Semigroup (Product f g a)Defined in base-4.20.2.0 · Data.Functor.Product(Monoid (f a), Monoid (g a)) => Monoid (Product f g a)Defined in base-4.20.2.0 · Data.Functor.Product(NFData (f a), NFData (g a)) => NFData (Product f g a)Defined in deepseq-1.5.0.0 · Control.DeepSeqNote: in
deepseq-1.5.0.0this instance's superclasses were changed.type Rep (Product f g a) = D1 ('MetaDataDefined in base-4.20.2.0 · Data.Functor.Product"Product"
"Data.Functor.Product"
"base"
'False) (C1 ('MetaCons"Pair"
'PrefixI 'False) (S1 ('MetaSel 'Nothing 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (f a)) :*: S1 ('MetaSel 'Nothing 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (g a))))type Rep1 (Product f g) = D1 ('MetaDataDefined in base-4.20.2.0 · Data.Functor.Product"Product"
"Data.Functor.Product"
"base"
'False) (C1 ('MetaCons"Pair"
'PrefixI 'False) (S1 ('MetaSel 'Nothing 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec1 f) :*: S1 ('MetaSel 'Nothing 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec1 g)))