Hoogle Search

Within LTS Haskell 24.12 (ghc-9.10.3)

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

  1. MapRequestEvent :: EventType -> CULong -> Bool -> Display -> Window -> Window -> Event

    X11 Graphics.X11.Xlib.Extras

    No documentation available.

  2. MappingNotifyEvent :: EventType -> CULong -> Bool -> Display -> Window -> MappingRequest -> KeyCode -> CInt -> Event

    X11 Graphics.X11.Xlib.Extras

    No documentation available.

  3. data MapF (k :: v -> Type) (a :: v -> Type)

    parameterized-utils Data.Parameterized.Map

    A map from parameterized keys to values with the same parameter type.

  4. type Mapping loc = Map Node loc Node loc

    HsYAML Data.YAML

    YAML mapping

  5. Mapping :: loc -> Tag -> Mapping loc -> Node loc

    HsYAML Data.YAML

    No documentation available.

  6. MappingEnd :: Event

    HsYAML Data.YAML.Event

    No documentation available.

  7. MappingStart :: !Maybe Anchor -> Tag -> NodeStyle -> Event

    HsYAML Data.YAML.Event

    No documentation available.

  8. type family Map2 (f :: a ~> b ~> c) (xs :: [a]) (ys :: [b]) :: [c]

    defun-core DeFun.List

    List binary map. I.e. liftA2 for lists. Note: this is not ZipWith.

    >>> :kind! Map2 (Con2 '(,)) [1, 2, 3] ['x', 'y']
    Map2 (Con2 '(,)) [1, 2, 3] ['x', 'y'] :: [(Natural, Char)]
    = ['(1, 'x'), '(1, 'y'), '(2, 'x'), '(2, 'y'), '(3, 'x'), '(3, 'y')]
    
    This function is a good example to highlight how to defunctionalize definitions with anonymous functions. The simple definition can be written using concatMap and map from Prelude:
    >>> import Prelude as P (concatMap, map, (.), flip)
    
    >>> let map2 f xs ys = P.concatMap (\x -> P.map (f x) ys) xs
    
    >>> map2 (,) "abc" "xy"
    [('a','x'),('a','y'),('b','x'),('b','y'),('c','x'),('c','y')]
    
    However, to make it easier (arguably) to defunctionalize, the concatMap argument lambda can be written in point-free form using combinators:
    >>> let map2 f xs ys = P.concatMap (P.flip P.map ys P.. f) xs
    
    >>> map2 (,) "abc" "xy"
    [('a','x'),('a','y'),('b','x'),('b','y'),('c','x'),('c','y')]
    
    Alternatively, we could define a new "top-level" function
    >>> let map2Aux f ys x = P.map (f x) ys
    
    and use it to define @map2:
    >>> let map2 f xs ys = P.concatMap (map2Aux f ys) xs
    
    >>> map2 (,) "abc" "xy"
    [('a','x'),('a','y'),('b','x'),('b','y'),('c','x'),('c','y')]
    

  9. data Map2Sym (f :: FunKind a ~> b ~> c [a] ~> [b] ~> [c])

    defun-core DeFun.List

    No documentation available.

  10. data Map2Sym1 (f :: a ~> b ~> c) (xs :: FunKind [a] [b] ~> [c])

    defun-core DeFun.List

    No documentation available.

Page 58 of many | Previous | Next