Safe Haskell | Safe |
---|---|
Language | Haskell2010 |
Synopsis
- class Lookup c k v | c -> k, c -> v where
- class LookupApply l1 l2 where
- alterDefault :: Lookup c k v => (Maybe v -> Maybe v) -> k -> c -> c
Documentation
class Lookup c k v | c -> k, c -> v where Source #
Class interface uses same names as Data.Map.
Instances must define: lookup
, findMin
, findMax
, fromList
, toList
, null
, alter
.
Union is left-biased in that left operand values overwrite right operand values, but all other contextinfo (if any andor relevant, like scope) is inherited from the right one.
lookup :: k -> c -> Maybe v Source #
fromList :: [(k, v)] -> c Source #
toList :: c -> [(k, v)] Source #
alter :: (Maybe v -> Maybe v) -> k -> c -> c Source #
singleton :: k -> v -> c Source #
insertWith :: (v -> v -> v) -> k -> v -> c -> c Source #
insert :: k -> v -> c -> c Source #
unionWith :: (v -> v -> v) -> c -> c -> c Source #
unionsWith :: (v -> v -> v) -> [c] -> c Source #
delete :: k -> c -> c Source #
Instances
class LookupApply l1 l2 where Source #
Instances
LookupApply l1 l2 => LookupApply l1 (Stacks l2) Source # | |
Ord k => LookupApply (VarMp' k v) (VarMp' k v) Source # | |