cabal-install-solver
Safe HaskellSafe-Inferred
LanguageHaskell2010

Distribution.Solver.Modular.PSQ

Synopsis

Documentation

newtype PSQ k v Source #

Constructors

PSQ [(k, v)] 

Instances

Instances details
Foldable (PSQ k) Source # 
Instance details

Defined in Distribution.Solver.Modular.PSQ

Methods

fold :: Monoid m => PSQ k m -> m #

foldMap :: Monoid m => (a -> m) -> PSQ k a -> m #

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

foldr :: (a -> b -> b) -> b -> PSQ k a -> b #

foldr' :: (a -> b -> b) -> b -> PSQ k a -> b #

foldl :: (b -> a -> b) -> b -> PSQ k a -> b #

foldl' :: (b -> a -> b) -> b -> PSQ k a -> b #

foldr1 :: (a -> a -> a) -> PSQ k a -> a #

foldl1 :: (a -> a -> a) -> PSQ k a -> a #

toList :: PSQ k a -> [a] #

null :: PSQ k a -> Bool #

length :: PSQ k a -> Int #

elem :: Eq a => a -> PSQ k a -> Bool #

maximum :: Ord a => PSQ k a -> a #

minimum :: Ord a => PSQ k a -> a #

sum :: Num a => PSQ k a -> a #

product :: Num a => PSQ k a -> a #

Traversable (PSQ k) Source # 
Instance details

Defined in Distribution.Solver.Modular.PSQ

Methods

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

sequenceA :: Applicative f => PSQ k (f a) -> f (PSQ k a) #

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

sequence :: Monad m => PSQ k (m a) -> m (PSQ k a) #

Functor (PSQ k) Source # 
Instance details

Defined in Distribution.Solver.Modular.PSQ

Methods

fmap :: (a -> b) -> PSQ k a -> PSQ k b #

(<$) :: a -> PSQ k b -> PSQ k a #

(Show k, Show v) => Show (PSQ k v) Source # 
Instance details

Defined in Distribution.Solver.Modular.PSQ

Methods

showsPrec :: Int -> PSQ k v -> ShowS #

show :: PSQ k v -> String #

showList :: [PSQ k v] -> ShowS #

(Eq k, Eq v) => Eq (PSQ k v) Source # 
Instance details

Defined in Distribution.Solver.Modular.PSQ

Methods

(==) :: PSQ k v -> PSQ k v -> Bool #

(/=) :: PSQ k v -> PSQ k v -> Bool #

casePSQ :: PSQ k a -> r -> (k -> a -> PSQ k a -> r) -> r Source #

cons :: k -> a -> PSQ k a -> PSQ k a Source #

length :: PSQ k a -> Int Source #

lookup :: Eq k => k -> PSQ k v -> Maybe v Source #

filter :: (a -> Bool) -> PSQ k a -> PSQ k a Source #

filterIfAny :: (a -> Bool) -> PSQ k a -> PSQ k a Source #

Will partition the list according to the predicate. If there is any element that satisfies the predicate, then only the elements satisfying the predicate are returned. Otherwise, the rest is returned.

filterIfAnyByKeys :: (k -> Bool) -> PSQ k a -> PSQ k a Source #

Variant of filterIfAny that takes a predicate on the keys rather than on the values.

filterKeys :: (k -> Bool) -> PSQ k a -> PSQ k a Source #

firstOnly :: PSQ k a -> PSQ k a Source #

fromList :: [(k, a)] -> PSQ k a Source #

keys :: PSQ k v -> [k] Source #

map :: (v1 -> v2) -> PSQ k v1 -> PSQ k v2 Source #

mapKeys :: (k1 -> k2) -> PSQ k1 v -> PSQ k2 v Source #

mapWithKey :: (k -> a -> b) -> PSQ k a -> PSQ k b Source #

maximumBy :: (k -> Int) -> PSQ k a -> (k, a) Source #

minimumBy :: (a -> Int) -> PSQ k a -> PSQ k a Source #

null :: PSQ k a -> Bool Source #

prefer :: (a -> Bool) -> PSQ k a -> PSQ k a Source #

Sort the list so that values satisfying the predicate are first.

preferByKeys :: (k -> Bool) -> PSQ k a -> PSQ k a Source #

Sort the list so that keys satisfying the predicate are first.

snoc :: PSQ k a -> k -> a -> PSQ k a Source #

sortBy :: (a -> a -> Ordering) -> PSQ k a -> PSQ k a Source #

sortByKeys :: (k -> k -> Ordering) -> PSQ k a -> PSQ k a Source #

toList :: PSQ k a -> [(k, a)] Source #

union :: PSQ k a -> PSQ k a -> PSQ k a Source #