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)
Instances63Generic1, FoldableWithIndex, FunctorWithIndex, TraversableWithIndex, Monad, Functor, …
Generic1 (Product f g)Defined in base-4.20.2.0 · Data.Functor.Product(FoldableWithIndex i f, FoldableWithIndex j g) => FoldableWithIndex (Either i j) (Product f g)Defined in indexed-traversable-0.1.4 · WithIndex(FunctorWithIndex i f, FunctorWithIndex j g) => FunctorWithIndex (Either i j) (Product f g)Defined in indexed-traversable-0.1.4 · WithIndex(TraversableWithIndex i f, TraversableWithIndex j g) => TraversableWithIndex (Either i j) (Product f g)Defined in indexed-traversable-0.1.4 · WithIndex(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(Hashable1 f, Hashable1 g) => Hashable1 (Product f g)Defined in hashable-1.4.7.0 · Data.Hashable.Class(Distributive f, Distributive g) => Distributive (Product f g)Defined in distributive-0.6.2.1 · Data.Distributive(Decidable f, Decidable g) => Decidable (Product f g)Defined in contravariant-1.5.5 · Data.Functor.Contravariant.Divisible(Divisible f, Divisible g) => Divisible (Product f g)Defined in contravariant-1.5.5 · Data.Functor.Contravariant.Divisible(Alt f, Alt g) => Alt (Product f g)Defined in semigroupoids-6.0.1 · Data.Functor.Alt(Apply f, Apply g) => Apply (Product f g)Defined in semigroupoids-6.0.1 · Data.Functor.Bind.Class(Bind f, Bind g) => Bind (Product f g)Defined in semigroupoids-6.0.1 · Data.Functor.Bind.Class(Conclude f, Conclude g) => Conclude (Product f g)Defined in semigroupoids-6.0.1 · Data.Functor.Contravariant.Conclude(Decide f, Decide g) => Decide (Product f g)Defined in semigroupoids-6.0.1 · Data.Functor.Contravariant.Decide(Divise f, Divise g) => Divise (Product f g)Defined in semigroupoids-6.0.1 · Data.Functor.Contravariant.Divise(Plus f, Plus g) => Plus (Product f g)Defined in semigroupoids-6.0.1 · Data.Functor.Plus(Traversable1 f, Traversable1 g) => Traversable1 (Product f g)Defined in semigroupoids-6.0.1 · Data.Semigroup.Traversable.Class(Representable f, Representable g) => Representable (Product f g)Defined in adjunctions-4.4.3 · Data.Functor.Rep(Representable f, Representable g) => Representable (Product f g)Defined in adjunctions-4.4.3 · Data.Functor.Contravariant.Rep(Invariant f, Invariant g) => Invariant (Product f g)Defined in invariant-0.6.4 · Data.Functor.Invariantfrom Data.Functor.Product
(Selective f, Selective g) => Selective (Product f g)Defined in selective-0.7.0.1 · Control.Selective(Adjustable f, Adjustable g) => Adjustable (Product f g)Defined in keys-3.12.3 · Data.Key(FoldableWithKey f, FoldableWithKey g) => FoldableWithKey (Product f g)Defined in keys-3.12.3 · Data.Key(FoldableWithKey1 f, FoldableWithKey1 g) => FoldableWithKey1 (Product f g)Defined in keys-3.12.3 · Data.Key(Indexable f, Indexable g) => Indexable (Product f g)Defined in keys-3.12.3 · Data.Key(Keyed f, Keyed g) => Keyed (Product f g)Defined in keys-3.12.3 · Data.Key(Lookup f, Lookup g) => Lookup (Product f g)Defined in keys-3.12.3 · Data.Key(TraversableWithKey f, TraversableWithKey g) => TraversableWithKey (Product f g)Defined in keys-3.12.3 · Data.Key(TraversableWithKey1 f, TraversableWithKey1 g) => TraversableWithKey1 (Product f g)Defined in keys-3.12.3 · Data.Key(Zip f, Zip g) => Zip (Product f g)Defined in keys-3.12.3 · Data.Key(ZipWithKey f, ZipWithKey g) => ZipWithKey (Product f g)Defined in keys-3.12.3 · Data.Key(Pointed p, Pointed q) => Pointed (Product p q)Defined in pointed-5.0.4 · Data.Pointed(Adjunction f g, Adjunction f' g') => Adjunction (Sum f f') (Product g g')Defined in adjunctions-4.4.3 · Data.Functor.Adjunction(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.(Hashable1 f, Hashable1 g, Hashable a) => Hashable (Product f g a)Defined in hashable-1.4.7.0 · Data.Hashable.Classtype 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)))type Rep (Product f g) = Either (Rep f) (Rep g)Defined in adjunctions-4.4.3 · Data.Functor.Reptype Rep (Product f g) = (Rep f, Rep g)Defined in adjunctions-4.4.3 · Data.Functor.Contravariant.Reptype Key (Product f g) = Either (Key f) (Key g)Defined in keys-3.12.3 · Data.Key