HORIZON HASKELLDocslts/ghc-10.0.xfc4e5982026-10-11Search names, modules, packages, or :: a typeCtrl K

GHC 10.0.0.20260917 · lts/ghc-10.0.x · fc4e598 · 2026-10-11

Modulelog-base-0.12.1.0Haskell2010

Log.Internal.Aeson.Compat

  • 2 types
  • 53 values
  • Packagelog-base-0.12.1.0
  • Exports55
  • LanguageHaskell2010
  • LicenceBSD-3-Clause
  • SourceKeyMap.hs
value(!?) :: KeyMap v -> Key -> Maybe v
#

Return the value to which the specified key is mapped, or Nothing if this map contains no mapping for the key.

This is a flipped version of lookup.

valuedelete :: Key -> KeyMap v -> KeyMap v
#

Remove the mapping for the specified key from this map if present.

valueelems :: KeyMap v -> [v]
#

Return a list of this map' elements.

valuefoldrWithKey :: (Key -> v -> a -> a) -> a -> KeyMap v -> a
#

Reduce this map by applying a binary operator to all elements, using the given starting value (typically the right-identity of the operator).

valuefromList :: [(Key, v)] -> KeyMap v
#

Construct a map with the supplied mappings. If the list contains duplicate mappings, the later mappings take precedence.

Example1 expression
fromList [("a", 'x'), ("a", 'y')]fromList [("a",'y')]
valuefromListWith :: (v -> v -> v) -> [(Key, v)] -> KeyMap v
#

Construct a map from a list of elements. Uses the provided function, f, to merge duplicate entries with (f newVal oldVal).

valueinsert :: Key -> v -> KeyMap v -> KeyMap v
#

Associate the specified value with the specified key in this map. If this map previously contained a mapping for the key, the old value is replaced.

valueinsertWith :: (a -> a -> a) -> Key -> a -> KeyMap a -> KeyMap a
#

Insert with a function combining new and old values, taken in that order.

valuelookup :: Key -> KeyMap v -> Maybe v
#

Return the value to which the specified key is mapped, or Nothing if this map contains no mapping for the key.

valuemap :: (a -> b) -> KeyMap a -> KeyMap b
#

Map a function over all values in the map.

valuesize :: KeyMap v -> Int
#

Return the number of key-value mappings in this map.

valuetoAscList :: KeyMap v -> [(Key, v)]
#

Return a list of this map's elements in ascending order based of the textual key.

valuetoList :: KeyMap v -> [(Key, v)]
#

Return a list of this map's keys and elements.

The order is not stable. Use toAscList for stable ordering.

valueunion :: KeyMap v -> KeyMap v -> KeyMap v
#

The (left-biased) union of two maps. It prefers the first map when duplicate keys are encountered, i.e. (union == unionWith Prelude.const).

newtypenewtype Key
#
Instances27Eq, Data, Ord, Read, Show, IsString, …
newtypenewtype KeyMap v
#

A map from JSON key type Key to v.

Instances38Functor, Foldable, Traversable, Arbitrary1, Align, Semialign, …