ghc-lib-parser-8.10.7.20210828: The GHC API, decoupled from GHC versions
Safe HaskellNone
LanguageHaskell2010

Bag

Documentation

data Bag a Source #

Instances

Instances details
Functor Bag Source # 
Instance details

Defined in Bag

Methods

fmap :: (a -> b) -> Bag a -> Bag b #

(<$) :: a -> Bag b -> Bag a #

Foldable Bag Source # 
Instance details

Defined in Bag

Methods

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

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

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

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

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

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

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

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

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

toList :: Bag a -> [a] #

null :: Bag a -> Bool #

length :: Bag a -> Int #

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

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

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

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

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

Traversable Bag Source # 
Instance details

Defined in Bag

Methods

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

sequenceA :: Applicative f => Bag (f a) -> f (Bag a) #

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

sequence :: Monad m => Bag (m a) -> m (Bag a) #

Data a => Data (Bag a) Source # 
Instance details

Defined in Bag

Methods

gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> Bag a -> c (Bag a) #

gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c (Bag a) #

toConstr :: Bag a -> Constr #

dataTypeOf :: Bag a -> DataType #

dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c (Bag a)) #

dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c (Bag a)) #

gmapT :: (forall b. Data b => b -> b) -> Bag a -> Bag a #

gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> Bag a -> r #

gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> Bag a -> r #

gmapQ :: (forall d. Data d => d -> u) -> Bag a -> [u] #

gmapQi :: Int -> (forall d. Data d => d -> u) -> Bag a -> u #

gmapM :: Monad m => (forall d. Data d => d -> m d) -> Bag a -> m (Bag a) #

gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> Bag a -> m (Bag a) #

gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> Bag a -> m (Bag a) #

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

Defined in Bag

Methods

ppr :: Bag a -> SDoc Source #

pprPrec :: Rational -> Bag a -> SDoc Source #

unitBag :: a -> Bag a Source #

unionBags :: Bag a -> Bag a -> Bag a Source #

mapBag :: (a -> b) -> Bag a -> Bag b Source #

elemBag :: Eq a => a -> Bag a -> Bool Source #

filterBag :: (a -> Bool) -> Bag a -> Bag a Source #

partitionBag :: (a -> Bool) -> Bag a -> (Bag a, Bag a) Source #

partitionBagWith :: (a -> Either b c) -> Bag a -> (Bag b, Bag c) Source #

concatBag :: Bag (Bag a) -> Bag a Source #

foldBag :: (r -> r -> r) -> (a -> r) -> r -> Bag a -> r Source #

consBag :: a -> Bag a -> Bag a infixr 3 Source #

snocBag :: Bag a -> a -> Bag a infixl 3 Source #

anyBag :: (a -> Bool) -> Bag a -> Bool Source #

allBag :: (a -> Bool) -> Bag a -> Bool Source #

listToBag :: [a] -> Bag a Source #

bagToList :: Bag a -> [a] Source #

mapAccumBagL Source #

Arguments

:: (acc -> x -> (acc, y))

combining function

-> acc

initial state

-> Bag x

inputs

-> (acc, Bag y)

final state, outputs

concatMapBag :: (a -> Bag b) -> Bag a -> Bag b Source #

concatMapBagPair :: (a -> (Bag b, Bag c)) -> Bag a -> (Bag b, Bag c) Source #

mapMaybeBag :: (a -> Maybe b) -> Bag a -> Bag b Source #

mapBagM :: Monad m => (a -> m b) -> Bag a -> m (Bag b) Source #

mapBagM_ :: Monad m => (a -> m b) -> Bag a -> m () Source #

flatMapBagM :: Monad m => (a -> m (Bag b)) -> Bag a -> m (Bag b) Source #

flatMapBagPairM :: Monad m => (a -> m (Bag b, Bag c)) -> Bag a -> m (Bag b, Bag c) Source #

mapAndUnzipBagM :: Monad m => (a -> m (b, c)) -> Bag a -> m (Bag b, Bag c) Source #

mapAccumBagLM Source #

Arguments

:: Monad m 
=> (acc -> x -> m (acc, y))

combining function

-> acc

initial state

-> Bag x

inputs

-> m (acc, Bag y)

final state, outputs

anyBagM :: Monad m => (a -> m Bool) -> Bag a -> m Bool Source #

filterBagM :: Monad m => (a -> m Bool) -> Bag a -> m (Bag a) Source #