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

Safe Haskell | Ignore
Language | GHC2021

GHC.Data.OrdList

Description

Provide trees (of instructions), so that lists of instructions can be appended in linear time.

Synopsis

- data OrdList a
- pattern NilOL :: OrdList a
- pattern ConsOL :: a -> OrdList a -> OrdList a
- pattern SnocOL :: OrdList a -> a -> OrdList a
- nilOL :: OrdList a
- isNilOL :: OrdList a -> Bool
- unitOL :: a -> OrdList a
- appOL :: OrdList a -> OrdList a -> OrdList a
- consOL :: a -> OrdList a -> OrdList a
- snocOL :: OrdList a -> a -> OrdList a
- concatOL :: [OrdList a] -> OrdList a
- lastOL :: OrdList a -> a
- headOL :: OrdList a -> a
- mapOL :: (a -> b) -> OrdList a -> OrdList b
- mapOL' :: (a -> b) -> OrdList a -> OrdList b
- fromOL :: OrdList a -> [a]
- toOL :: [a] -> OrdList a
- foldrOL :: (a -> b -> b) -> b -> OrdList a -> b
- foldlOL :: (b -> a -> b) -> b -> OrdList a -> b
- partitionOL :: (a -> Bool) -> OrdList a -> (OrdList a, OrdList a)
- reverseOL :: OrdList a -> OrdList a
- fromOLReverse :: OrdList a -> [a]
- strictlyEqOL :: Eq a => OrdList a -> OrdList a -> Bool
- strictlyOrdOL :: Ord a => OrdList a -> OrdList a -> Ordering

# Documentation

data OrdList a #

#### Instances

Instances details

Functor OrdList # |
Instance details Defined in GHC.Data.OrdList Methods fmap :: (a -> b) -> OrdList a -> OrdList b # (<$) :: a -> OrdList b -> OrdList a #
Foldable OrdList # |

Instance details

Defined in GHC.Data.OrdList

Methods

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

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

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

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

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

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

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

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

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

toList :: OrdList a -> [a] #

null :: OrdList a -> Bool #

length :: OrdList a -> Int #

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

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

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

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

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

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

pattern NilOL :: OrdList a #

pattern ConsOL :: a -> OrdList a -> OrdList a #

pattern SnocOL :: OrdList a -> a -> OrdList a #

nilOL :: OrdList a #

isNilOL :: OrdList a -> Bool #

unitOL :: a -> OrdList a #

appOL :: OrdList a -> OrdList a -> OrdList a infixl 5 #

consOL :: a -> OrdList a -> OrdList a infixr 5 #

snocOL :: OrdList a -> a -> OrdList a infixl 5 #

concatOL :: [OrdList a] -> OrdList a #

lastOL :: OrdList a -> a #

headOL :: OrdList a -> a #

mapOL :: (a -> b) -> OrdList a -> OrdList b #

mapOL' :: (a -> b) -> OrdList a -> OrdList b #

fromOL :: OrdList a -> [a] #

toOL :: [a] -> OrdList a #

foldrOL :: (a -> b -> b) -> b -> OrdList a -> b #

foldlOL :: (b -> a -> b) -> b -> OrdList a -> b #

Strict left fold.

partitionOL :: (a -> Bool) -> OrdList a -> (OrdList a, OrdList a) #

reverseOL :: OrdList a -> OrdList a #

fromOLReverse :: OrdList a -> [a] #

strictlyEqOL :: Eq a => OrdList a -> OrdList a -> Bool #

Compare not only the values but also the structure of two lists

strictlyOrdOL :: Ord a => OrdList a -> OrdList a -> Ordering #

Compare not only the values but also the structure of two lists