Hoogle Search
Within LTS Haskell 24.35 (ghc-9.10.3)
Note that Stackage only displays results for the latest LTS and Nightly snapshot. Learn more.
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
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.
blockMapF :: (IsList t, Item t ~ (k, v), Buildable k, Buildable v) => t -> Builderfmt Fmt A YAML-like map formatter:
>>> fmt $ blockMapF [("Odds", blockListF [1,3]), ("Evens", blockListF [2,4])] Odds: - 1 - 3 Evens: - 2 - 4blockMapF' :: (IsList t, Item t ~ (k, v)) => (k -> Builder) -> (v -> Builder) -> t -> Builderfmt Fmt A version of blockMapF that lets you supply your own building function for keys and values.
jsonMapF :: (IsList t, Item t ~ (k, v), Buildable k, Buildable v) => t -> Builderfmt 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 ] }jsonMapF' :: (IsList t, Item t ~ (k, v)) => (k -> Builder) -> (v -> Builder) -> t -> Builderfmt Fmt A version of jsonMapF that lets you supply your own building function for keys and values.
blockMapF :: (IsList t, Item t ~ (k, v), Buildable k, Buildable v) => t -> Builderfmt Fmt.Internal.Formatters A YAML-like map formatter:
>>> fmt $ blockMapF [("Odds", blockListF [1,3]), ("Evens", blockListF [2,4])] Odds: - 1 - 3 Evens: - 2 - 4blockMapF' :: (IsList t, Item t ~ (k, v)) => (k -> Builder) -> (v -> Builder) -> t -> Builderfmt Fmt.Internal.Formatters A version of blockMapF that lets you supply your own building function for keys and values.
jsonMapF :: (IsList t, Item t ~ (k, v), Buildable k, Buildable v) => t -> Builderfmt Fmt.Internal.Formatters 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 ] }jsonMapF' :: (IsList t, Item t ~ (k, v)) => (k -> Builder) -> (v -> Builder) -> t -> Builderfmt Fmt.Internal.Formatters A version of jsonMapF that lets you supply your own building function for keys and values.