ghc-9.6.0.20230111: The GHC API
Safe HaskellSafe-Inferred
LanguageHaskell2010

GHC.Data.Pair

Documentation

data Pair a Source #

Constructors

Pair 

Fields

Instances

Instances details
Foldable Pair Source # 
Instance details

Defined in GHC.Data.Pair

Methods

fold :: Monoid m => Pair m -> m Source #

foldMap :: Monoid m => (a -> m) -> Pair a -> m Source #

foldMap' :: Monoid m => (a -> m) -> Pair a -> m Source #

foldr :: (a -> b -> b) -> b -> Pair a -> b Source #

foldr' :: (a -> b -> b) -> b -> Pair a -> b Source #

foldl :: (b -> a -> b) -> b -> Pair a -> b Source #

foldl' :: (b -> a -> b) -> b -> Pair a -> b Source #

foldr1 :: (a -> a -> a) -> Pair a -> a Source #

foldl1 :: (a -> a -> a) -> Pair a -> a Source #

toList :: Pair a -> [a] Source #

null :: Pair a -> Bool Source #

length :: Pair a -> Int Source #

elem :: Eq a => a -> Pair a -> Bool Source #

maximum :: Ord a => Pair a -> a Source #

minimum :: Ord a => Pair a -> a Source #

sum :: Num a => Pair a -> a Source #

product :: Num a => Pair a -> a Source #

Traversable Pair Source # 
Instance details

Defined in GHC.Data.Pair

Methods

traverse :: Applicative f => (a -> f b) -> Pair a -> f (Pair b) Source #

sequenceA :: Applicative f => Pair (f a) -> f (Pair a) Source #

mapM :: Monad m => (a -> m b) -> Pair a -> m (Pair b) Source #

sequence :: Monad m => Pair (m a) -> m (Pair a) Source #

Applicative Pair Source # 
Instance details

Defined in GHC.Data.Pair

Methods

pure :: a -> Pair a Source #

(<*>) :: Pair (a -> b) -> Pair a -> Pair b Source #

liftA2 :: (a -> b -> c) -> Pair a -> Pair b -> Pair c Source #

(*>) :: Pair a -> Pair b -> Pair b Source #

(<*) :: Pair a -> Pair b -> Pair a Source #

Functor Pair Source # 
Instance details

Defined in GHC.Data.Pair

Methods

fmap :: (a -> b) -> Pair a -> Pair b Source #

(<$) :: a -> Pair b -> Pair a Source #

(Semigroup a, Monoid a) => Monoid (Pair a) Source # 
Instance details

Defined in GHC.Data.Pair

Methods

mempty :: Pair a Source #

mappend :: Pair a -> Pair a -> Pair a Source #

mconcat :: [Pair a] -> Pair a Source #

Semigroup a => Semigroup (Pair a) Source # 
Instance details

Defined in GHC.Data.Pair

Methods

(<>) :: Pair a -> Pair a -> Pair a Source #

sconcat :: NonEmpty (Pair a) -> Pair a Source #

stimes :: Integral b => b -> Pair a -> Pair a Source #

Outputable a => Outputable (Pair a) Source # 
Instance details

Defined in GHC.Data.Pair

Methods

ppr :: Pair a -> SDoc Source #

unPair :: Pair a -> (a, a) Source #

toPair :: (a, a) -> Pair a Source #

swap :: Pair a -> Pair a Source #

pLiftFst :: (a -> a) -> Pair a -> Pair a Source #

pLiftSnd :: (a -> a) -> Pair a -> Pair a Source #