ghc-lib-parser-9.14.1.20251220: 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

Foldable1 Pair # |
Instance details Defined in GHC.Data.Pair Methods fold1 :: Semigroup m => Pair m -> m # foldMap1 :: Semigroup m => (a -> m) -> Pair a -> m # foldMap1' :: Semigroup m => (a -> m) -> Pair a -> m # toNonEmpty :: Pair a -> NonEmpty a # maximum :: Ord a => Pair a -> a # minimum :: Ord a => Pair a -> a # head :: Pair a -> a # last :: Pair a -> a # foldrMap1 :: (a -> b) -> (a -> b -> b) -> Pair a -> b # foldlMap1' :: (a -> b) -> (b -> a -> b) -> Pair a -> b # foldlMap1 :: (a -> b) -> (b -> a -> b) -> Pair a -> b # foldrMap1' :: (a -> b) -> (a -> b -> b) -> Pair a -> b #
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 #

unzipPairs :: [Pair a] -> ([a], [a]) #