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.
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)
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.
data
FoldMap (b :: a -> Exp m) (c :: t a) (d :: m)first-class-families Fcf.Class.Foldable Type-level foldMap.
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)
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.