base-4.10.0.0: Basic libraries

Copyright(c) Ross Paterson 2010
LicenseBSD-style (see the file LICENSE)
Maintainerlibraries@haskell.org
Stabilityexperimental
Portabilityportable
Safe HaskellSafe
LanguageHaskell2010

Data.Functor.Product

Description

Products, lifted to functors.

Since: 4.9.0.0

Synopsis

Documentation

data Product f g a Source #

Lifted product of functors.

Constructors

Pair (f a) (g a) 

Instances

Generic1 k (Product k f g) # 

Associated Types

type Rep1 (Product k f g) (f :: Product k f g -> *) :: k -> * Source #

Methods

from1 :: f a -> Rep1 (Product k f g) f a Source #

to1 :: Rep1 (Product k f g) f a -> f a Source #

(Monad f, Monad g) => Monad (Product * f g) #

Since: 4.9.0.0

Methods

(>>=) :: Product * f g a -> (a -> Product * f g b) -> Product * f g b Source #

(>>) :: Product * f g a -> Product * f g b -> Product * f g b Source #

return :: a -> Product * f g a Source #

fail :: String -> Product * f g a Source #

(Functor f, Functor g) => Functor (Product * f g) #

Since: 4.9.0.0

Methods

fmap :: (a -> b) -> Product * f g a -> Product * f g b Source #

(<$) :: a -> Product * f g b -> Product * f g a Source #

(MonadFix f, MonadFix g) => MonadFix (Product * f g) #

Since: 4.9.0.0

Methods

mfix :: (a -> Product * f g a) -> Product * f g a Source #

(Applicative f, Applicative g) => Applicative (Product * f g) #

Since: 4.9.0.0

Methods

pure :: a -> Product * f g a Source #

(<*>) :: Product * f g (a -> b) -> Product * f g a -> Product * f g b Source #

liftA2 :: (a -> b -> c) -> Product * f g a -> Product * f g b -> Product * f g c Source #

(*>) :: Product * f g a -> Product * f g b -> Product * f g b Source #

(<*) :: Product * f g a -> Product * f g b -> Product * f g a Source #

(Foldable f, Foldable g) => Foldable (Product * f g) #

Since: 4.9.0.0

Methods

fold :: Monoid m => Product * f g m -> m Source #

foldMap :: Monoid m => (a -> m) -> Product * f g a -> m Source #

foldr :: (a -> b -> b) -> b -> Product * f g a -> b Source #

foldr' :: (a -> b -> b) -> b -> Product * f g a -> b Source #

foldl :: (b -> a -> b) -> b -> Product * f g a -> b Source #

foldl' :: (b -> a -> b) -> b -> Product * f g a -> b Source #

foldr1 :: (a -> a -> a) -> Product * f g a -> a Source #

foldl1 :: (a -> a -> a) -> Product * f g a -> a Source #

toList :: Product * f g a -> [a] Source #

null :: Product * f g a -> Bool Source #

length :: Product * f g a -> Int Source #

elem :: Eq a => a -> Product * f g a -> Bool Source #

maximum :: Ord a => Product * f g a -> a Source #

minimum :: Ord a => Product * f g a -> a Source #

sum :: Num a => Product * f g a -> a Source #

product :: Num a => Product * f g a -> a Source #

(Traversable f, Traversable g) => Traversable (Product * f g) #

Since: 4.9.0.0

Methods

traverse :: Applicative f => (a -> f b) -> Product * f g a -> f (Product * f g b) Source #

sequenceA :: Applicative f => Product * f g (f a) -> f (Product * f g a) Source #

mapM :: Monad m => (a -> m b) -> Product * f g a -> m (Product * f g b) Source #

sequence :: Monad m => Product * f g (m a) -> m (Product * f g a) Source #

(MonadPlus f, MonadPlus g) => MonadPlus (Product * f g) #

Since: 4.9.0.0

Methods

mzero :: Product * f g a Source #

mplus :: Product * f g a -> Product * f g a -> Product * f g a Source #

(Alternative f, Alternative g) => Alternative (Product * f g) #

Since: 4.9.0.0

Methods

empty :: Product * f g a Source #

(<|>) :: Product * f g a -> Product * f g a -> Product * f g a Source #

some :: Product * f g a -> Product * f g [a] Source #

many :: Product * f g a -> Product * f g [a] Source #

(MonadZip f, MonadZip g) => MonadZip (Product * f g) #

Since: 4.9.0.0

Methods

mzip :: Product * f g a -> Product * f g b -> Product * f g (a, b) Source #

mzipWith :: (a -> b -> c) -> Product * f g a -> Product * f g b -> Product * f g c Source #

munzip :: Product * f g (a, b) -> (Product * f g a, Product * f g b) Source #

(Show1 f, Show1 g) => Show1 (Product * f g) #

Since: 4.9.0.0

Methods

liftShowsPrec :: (Int -> a -> ShowS) -> ([a] -> ShowS) -> Int -> Product * f g a -> ShowS Source #

liftShowList :: (Int -> a -> ShowS) -> ([a] -> ShowS) -> [Product * f g a] -> ShowS Source #

(Read1 f, Read1 g) => Read1 (Product * f g) #

Since: 4.9.0.0

Methods

liftReadsPrec :: (Int -> ReadS a) -> ReadS [a] -> Int -> ReadS (Product * f g a) Source #

liftReadList :: (Int -> ReadS a) -> ReadS [a] -> ReadS [Product * f g a] Source #

liftReadPrec :: ReadPrec a -> ReadPrec [a] -> ReadPrec (Product * f g a) Source #

liftReadListPrec :: ReadPrec a -> ReadPrec [a] -> ReadPrec [Product * f g a] Source #

(Ord1 f, Ord1 g) => Ord1 (Product * f g) #

Since: 4.9.0.0

Methods

liftCompare :: (a -> b -> Ordering) -> Product * f g a -> Product * f g b -> Ordering Source #

(Eq1 f, Eq1 g) => Eq1 (Product * f g) #

Since: 4.9.0.0

Methods

liftEq :: (a -> b -> Bool) -> Product * f g a -> Product * f g b -> Bool Source #

(Eq1 f, Eq1 g, Eq a) => Eq (Product * f g a) #

Since: 4.9.0.0

Methods

(==) :: Product * f g a -> Product * f g a -> Bool Source #

(/=) :: Product * f g a -> Product * f g a -> Bool Source #

(Data (g a), Data (f a), Typeable * k, Typeable (k -> *) g, Typeable (k -> *) f, Typeable k a) => Data (Product k f g a) # 

Methods

gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall b. b -> c b) -> Product k f g a -> c (Product k f g a) Source #

gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c (Product k f g a) Source #

toConstr :: Product k f g a -> Constr Source #

dataTypeOf :: Product k f g a -> DataType Source #

dataCast1 :: Typeable (* -> *) t => (forall d. Data d => c (t d)) -> Maybe (c (Product k f g a)) Source #

dataCast2 :: Typeable (* -> * -> *) t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c (Product k f g a)) Source #

gmapT :: (forall b. Data b => b -> b) -> Product k f g a -> Product k f g a Source #

gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> Product k f g a -> r Source #

gmapQr :: (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> Product k f g a -> r Source #

gmapQ :: (forall d. Data d => d -> u) -> Product k f g a -> [u] Source #

gmapQi :: Int -> (forall d. Data d => d -> u) -> Product k f g a -> u Source #

gmapM :: Monad m => (forall d. Data d => d -> m d) -> Product k f g a -> m (Product k f g a) Source #

gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> Product k f g a -> m (Product k f g a) Source #

gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> Product k f g a -> m (Product k f g a) Source #

(Ord1 f, Ord1 g, Ord a) => Ord (Product * f g a) #

Since: 4.9.0.0

Methods

compare :: Product * f g a -> Product * f g a -> Ordering Source #

(<) :: Product * f g a -> Product * f g a -> Bool Source #

(<=) :: Product * f g a -> Product * f g a -> Bool Source #

(>) :: Product * f g a -> Product * f g a -> Bool Source #

(>=) :: Product * f g a -> Product * f g a -> Bool Source #

max :: Product * f g a -> Product * f g a -> Product * f g a Source #

min :: Product * f g a -> Product * f g a -> Product * f g a Source #

(Read1 f, Read1 g, Read a) => Read (Product * f g a) #

Since: 4.9.0.0

(Show1 f, Show1 g, Show a) => Show (Product * f g a) #

Since: 4.9.0.0

Methods

showsPrec :: Int -> Product * f g a -> ShowS Source #

show :: Product * f g a -> String Source #

showList :: [Product * f g a] -> ShowS Source #

Generic (Product k f g a) # 

Associated Types

type Rep (Product k f g a) :: * -> * Source #

Methods

from :: Product k f g a -> Rep (Product k f g a) x Source #

to :: Rep (Product k f g a) x -> Product k f g a Source #

type Rep1 k (Product k f g) # 
type Rep (Product k f g a) #