Hoogle Search

Within LTS Haskell 24.40 (ghc-9.10.3)

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

  1. data Bimap (c :: a -> Exp a') (d :: b -> Exp b') (e :: f a b) (g :: f a' b')

    first-class-families Fcf.Class.Bifunctor

    Type-level bimap.

    Example

    >>> data Example where Ex :: a -> Example  -- Hide the type of examples to avoid brittleness in different GHC versions
    
    >>> :kind! Ex (Eval (Bimap ((+) 1) (Flip (-) 1) '(2, 4)) :: (Natural, Natural))
    Ex (Eval (Bimap ((+) 1) (Flip (-) 1) '(2, 4)) :: (Natural, Natural)) :: Example
    = Ex '(3, 3)
    

  2. data ConcatMap (c :: a -> Exp [b]) (d :: t a) (e :: [b])

    first-class-families Fcf.Class.Foldable

    Map a function and concatenate the results. This is FoldMap specialized to the list monoid.

  3. data FoldMap (b :: a -> Exp m) (c :: t a) (d :: m)

    first-class-families Fcf.Class.Foldable

    Type-level foldMap.

  4. data Bimap (c :: a -> Exp a') (d :: b -> Exp b') (e :: f a b) (g :: f a' b')

    first-class-families Fcf.Classes

    Type-level bimap.

    Example

    >>> data Example where Ex :: a -> Example  -- Hide the type of examples to avoid brittleness in different GHC versions
    
    >>> :kind! Ex (Eval (Bimap ((+) 1) (Flip (-) 1) '(2, 4)) :: (Natural, Natural))
    Ex (Eval (Bimap ((+) 1) (Flip (-) 1) '(2, 4)) :: (Natural, Natural)) :: Example
    = Ex '(3, 3)
    

  5. data Bicomap (f :: a -> Exp c) (g :: b -> Exp d) (h :: c -> d -> Exp e) (i :: a) (j :: b) (k :: e)

    first-class-families Fcf.Data.Function

    Pre-compose a binary function with a function for each argument.

    Example

    >>> :kind! Eval (Bicomap Fst Pure (||) '(False, Nothing) True)
    Eval (Bicomap Fst Pure (||) '(False, Nothing) True) :: Bool
    = True
    

  6. data ConcatMap (c :: a -> Exp [b]) (d :: t a) (e :: [b])

    first-class-families Fcf.Data.List

    Map a function and concatenate the results. This is FoldMap specialized to the list monoid.

  7. blockMapF :: (IsList t, Item t ~ (k, v), Buildable k, Buildable v) => t -> Builder

    fmt Fmt

    A YAML-like map formatter:

    >>> fmt $ blockMapF [("Odds", blockListF [1,3]), ("Evens", blockListF [2,4])]
    Odds:
    - 1
    - 3
    Evens:
    - 2
    - 4
    

  8. blockMapF' :: (IsList t, Item t ~ (k, v)) => (k -> Builder) -> (v -> Builder) -> t -> Builder

    fmt Fmt

    A version of blockMapF that lets you supply your own building function for keys and values.

  9. jsonMapF :: (IsList t, Item t ~ (k, v), Buildable k, Buildable v) => t -> Builder

    fmt Fmt

    A JSON-like map formatter (unlike mapF, always multiline):

    >>> fmt $ jsonMapF [("Odds", jsonListF [1,3]), ("Evens", jsonListF [2,4])]
    {
    Odds:
    [
    1
    , 3
    ]
    , Evens:
    [
    2
    , 4
    ]
    }
    

  10. jsonMapF' :: (IsList t, Item t ~ (k, v)) => (k -> Builder) -> (v -> Builder) -> t -> Builder

    fmt Fmt

    A version of jsonMapF that lets you supply your own building function for keys and values.

Page 519 of many | Previous | Next