HORIZON HASKELLDocslts/ghc-10.0.x8fef28d2026-11-02Search packagesCtrl K
Theme: |

GHC 10.0.0.20260917 · lts/ghc-10.0.x · 8fef28d · 2026-11-02

Modulelog-base-0.12.1.0Haskell2010

Log.Internal.Aeson.Compat

Synopsis
  • 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.

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.

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.

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

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

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, …