Hoogle Search

Within LTS Haskell 24.10 (ghc-9.10.2)

Note that Stackage only displays results for the latest LTS and Nightly snapshot. Learn more.

  1. toIntMapWith :: (v -> v -> v) -> [(Int, v)] -> IntMap v

    discrimination Data.Discrimination.Sorting

    O(n). Construct an IntMap, combining values. This is an asymptotically faster version of fromListWith, which exploits ordered discrimination. (Note: values combine in anti-stable order for compatibility with fromListWith)

    >>> toIntMapWith (++) [(5,"a"), (5,"b"), (3,"b"), (3,"a"), (5,"c")]
    fromList [(3,"ab"),(5,"cba")]
    
    >>> IntMap.fromListWith (++) [(5,"a"), (5,"b"), (3,"b"), (3,"a"), (5,"c")]
    fromList [(3,"ab"),(5,"cba")]
    
    >>> toIntMapWith (++) []
    fromList []
    

  2. toIntMapWithKey :: (Int -> v -> v -> v) -> [(Int, v)] -> IntMap v

    discrimination Data.Discrimination.Sorting

    O(n). Construct a Map, combining values with access to the key. This is an asymptotically faster version of fromListWithKey, which exploits ordered discrimination. (Note: the values combine in anti-stable order for compatibility with fromListWithKey)

    >>> let f key new_value old_value = show key ++ ":" ++ new_value ++ "|" ++ old_value
    
    >>> toIntMapWithKey f [(5,"a"), (5,"b"), (3,"b"), (3,"a"), (5,"c")]
    fromList [(3,"3:a|b"),(5,"5:c|5:b|a")]
    
    >>> IntMap.fromListWithKey f [(5,"a"), (5,"b"), (3,"b"), (3,"a"), (5,"c")]
    fromList [(3,"3:a|b"),(5,"5:c|5:b|a")]
    
    >>> toIntMapWithKey f []
    fromList []
    

  3. data EndpointMap a

    servant-cli Servant.CLI.Internal.PStruct

    A map of endpoints associated with methods, paired with an optional "raw" endpoint.

  4. tableIntMap :: TomlBiMap Key Int -> (Key -> TomlCodec v) -> Key -> TomlCodec (IntMap v)

    tomland Toml.Codec.Combinator.Map

    This TomlCodec helps to convert TOML key-value pairs directly to IntMap using TOML Int keys as IntMap keys. For example, if you can write your IntMap in TOML like this:

    [myIntMap]
    1 = "value1"
    2 = "value2"
    

  5. asIntMap :: IntMap v -> IntMap v

    classy-prelude-yesod ClassyPrelude.Yesod

    No documentation available.

  6. class (IsRecord r c, Coercible m IntMap r) => IsRecordIntMap r c m | r -> c, c -> r, r -> m, m -> r

    columnar Text.Columnar

    No documentation available.

  7. mkIntMap :: (a -> Int) -> [a] -> IntMap a

    columnar Text.Columnar

    No documentation available.

  8. data Some2IntMapWith (p :: Type -> Type -> Type) a b

    refined-containers Data.IntMap.Refined

    An existential wrapper for a pair of maps with as-yet-unknown sets of keys, together with a proof of some fact p relating them.

  9. Some2IntMapWith :: forall s t a b (p :: Type -> Type -> Type) . !IntMap s a -> !IntMap t b -> !p s t -> Some2IntMapWith p a b

    refined-containers Data.IntMap.Refined

    No documentation available.

  10. data SomeIntMap a

    refined-containers Data.IntMap.Refined

    An existential wrapper for an IntMap with an as-yet-unknown set of keys. Pattern maching on it gives you a way to refer to the set (the parameter s), e.g.

    case fromIntMap ... of
    SomeIntMap @s m -> doSomethingWith @s
    
    case fromIntMap ... of
    SomeIntMap (m :: IntMap s a) -> doSomethingWith @s
    

Page 12 of many | Previous | Next