Hoogle Search

Within LTS Haskell 24.45 (ghc-9.10.3)

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

  1. bimapM :: (Monad m, Ord k') => (k -> v -> m (k', v')) -> Map k v -> m (Map k' v')

    dbus DBus.Internal.Types

    No documentation available.

  2. ToMap :: Expr s a -> Maybe (Expr s a) -> Expr s a

    dhall Dhall.Core

    ToMap x (Just t)                         ~  toMap x : t
    ToMap x  Nothing                         ~  toMap x
    

  3. useToMap :: Expr s a -> Maybe (Expr s a)

    dhall Dhall.Lint

    This replaces a record of key-value pairs with the equivalent use of toMap This is currently not used by dhall lint because this would sort Map keys, which is not necessarily a behavior-preserving change, but is still made available as a convenient rewrite rule. For example, {json,yaml}-to-dhall use this rewrite to simplify their output.

  4. foldMapWithKey :: (Monoid m, Ord k) => (k -> a -> m) -> Map k a -> m

    dhall Dhall.Map

    Fold all of the key-value pairs in a Map, in their original order

    >>> foldMapWithKey (,) (fromList [("B",[1]),("A",[2])])
    ("BA",[1,2])
    

  5. fromMap :: Map k v -> Map k v

    dhall Dhall.Map

    Create a Map from a Data.Map.Strict.Map

  6. toMap :: Map k v -> Map k v

    dhall Dhall.Map

    Convert a Dhall.Map.Map to a Data.Map.Strict.Map

    >>> toMap (fromList [("B",1),("A",2)]) -- Order is lost upon conversion
    fromList [("A",2),("B",1)]
    

  7. hashMap :: (Eq k, Hashable k) => Decoder k -> Decoder v -> Decoder (HashMap k v)

    dhall Dhall.Marshal.Decode

    Decode a HashMap from a toMap expression or generally a Prelude.Map.Type.

    >>> fmap (List.sort . HashMap.toList) (input (Dhall.hashMap strictText bool) "toMap { a = True, b = False }")
    [("a",True),("b",False)]
    
    >>> fmap (List.sort . HashMap.toList) (input (Dhall.hashMap strictText bool) "[ { mapKey = \"foo\", mapValue = True } ]")
    [("foo",True)]
    
    If there are duplicate mapKeys, later mapValues take precedence:
    >>> let expr = "[ { mapKey = 1, mapValue = True }, { mapKey = 1, mapValue = False } ]"
    
    >>> input (Dhall.hashMap natural bool) expr
    fromList [(1,False)]
    

  8. pairFromMapEntry :: Decoder k -> Decoder v -> Decoder (k, v)

    dhall Dhall.Marshal.Decode

    Decode a tuple from a Prelude.Map.Entry record.

    >>> input (pairFromMapEntry strictText natural) "{ mapKey = \"foo\", mapValue = 3 }"
    ("foo",3)
    

  9. NakedMergeOrSomeOrToMap :: ApplicationExprInfo

    dhall Dhall.Parser.Expression

    merge x y, Some x or toMap x, unparenthesized.

  10. _toMap :: Parser ()

    dhall Dhall.Parser.Token

    Parse the toMap keyword This corresponds to the toMap rule from the official grammar

Page 939 of many | Previous | Next