Safe Haskell | Safe-Inferred |
---|---|
Language | Haskell2010 |
Synopsis
- newtype PSQ k v = PSQ [(k, v)]
- casePSQ :: PSQ k a -> r -> (k -> a -> PSQ k a -> r) -> r
- cons :: k -> a -> PSQ k a -> PSQ k a
- length :: PSQ k a -> Int
- lookup :: Eq k => k -> PSQ k v -> Maybe v
- filter :: (a -> Bool) -> PSQ k a -> PSQ k a
- filterIfAny :: (a -> Bool) -> PSQ k a -> PSQ k a
- filterIfAnyByKeys :: (k -> Bool) -> PSQ k a -> PSQ k a
- filterKeys :: (k -> Bool) -> PSQ k a -> PSQ k a
- firstOnly :: PSQ k a -> PSQ k a
- fromList :: [(k, a)] -> PSQ k a
- isZeroOrOne :: PSQ k a -> Bool
- keys :: PSQ k v -> [k]
- map :: (v1 -> v2) -> PSQ k v1 -> PSQ k v2
- mapKeys :: (k1 -> k2) -> PSQ k1 v -> PSQ k2 v
- mapWithKey :: (k -> a -> b) -> PSQ k a -> PSQ k b
- maximumBy :: (k -> Int) -> PSQ k a -> (k, a)
- minimumBy :: (a -> Int) -> PSQ k a -> PSQ k a
- null :: PSQ k a -> Bool
- prefer :: (a -> Bool) -> PSQ k a -> PSQ k a
- preferByKeys :: (k -> Bool) -> PSQ k a -> PSQ k a
- snoc :: PSQ k a -> k -> a -> PSQ k a
- sortBy :: (a -> a -> Ordering) -> PSQ k a -> PSQ k a
- sortByKeys :: (k -> k -> Ordering) -> PSQ k a -> PSQ k a
- toList :: PSQ k a -> [(k, a)]
- union :: PSQ k a -> PSQ k a -> PSQ k a
Documentation
PSQ [(k, v)] |
Instances
Functor (PSQ k) Source # | |
Foldable (PSQ k) Source # | |
Defined in Distribution.Solver.Modular.PSQ 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 # elem :: Eq a => a -> PSQ k a -> Bool # maximum :: Ord a => PSQ k a -> a # minimum :: Ord a => PSQ k a -> a # | |
Traversable (PSQ k) Source # | |
(Eq k, Eq v) => Eq (PSQ k v) Source # | |
(Show k, Show v) => Show (PSQ k v) 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.
isZeroOrOne :: PSQ k a -> Bool Source #
mapWithKey :: (k -> a -> b) -> PSQ k a -> PSQ k b Source #
prefer :: (a -> Bool) -> PSQ k a -> PSQ k a Source #
Sort the list so that values satisfying the predicate are first.