ghc-lib-parser-9.10.1.20250103: The GHC API, decoupled from GHC versions

Safe Haskell | Ignore
Language | GHC2021

GHC.Data.Pair

# Documentation

data Pair a #

Constructors

Pair |

Fields

- pFst :: a
- pSnd :: a

#### Instances

Instances details

Applicative Pair # |
Instance details Defined in GHC.Data.Pair Methods pure :: a -> Pair a # (<*>) :: Pair (a -> b) -> Pair a -> Pair b # liftA2 :: (a -> b -> c) -> Pair a -> Pair b -> Pair c # (*>) :: Pair a -> Pair b -> Pair b # (<*) :: Pair a -> Pair b -> Pair a #
Functor Pair # |
Instance details Defined in GHC.Data.Pair Methods fmap :: (a -> b) -> Pair a -> Pair b # (<$) :: a -> Pair b -> Pair a #
Foldable Pair # |

Instance details

Defined in GHC.Data.Pair

Methods

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

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

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

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

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

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

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

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

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

toList :: Pair a -> [a] #

null :: Pair a -> Bool #

length :: Pair a -> Int #

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

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

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

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

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

Traversable Pair # |
Instance details Defined in GHC.Data.Pair Methods traverse :: Applicative f => (a -> f b) -> Pair a -> f (Pair b) # sequenceA :: Applicative f => Pair (f a) -> f (Pair a) # mapM :: Monad m => (a -> m b) -> Pair a -> m (Pair b) # sequence :: Monad m => Pair (m a) -> m (Pair a) #
(Semigroup a, Monoid a) => Monoid (Pair a) # |
Instance details Defined in GHC.Data.Pair Methods mempty :: Pair a # mappend :: Pair a -> Pair a -> Pair a # mconcat :: [Pair a] -> Pair a #
Semigroup a => Semigroup (Pair a) # |
Instance details Defined in GHC.Data.Pair Methods (<>) :: Pair a -> Pair a -> Pair a # sconcat :: NonEmpty (Pair a) -> Pair a # stimes :: Integral b => b -> Pair a -> Pair a #
Outputable a => Outputable (Pair a) # |
Instance details Defined in GHC.Data.Pair Methods ppr :: Pair a -> SDoc #

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

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

swap :: Pair a -> Pair a #

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

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