Hoogle Search
Within LTS Haskell 24.68 (ghc-9.10.3)
Note that Stackage only displays results for the latest LTS and Nightly snapshot. Learn more.
fromAp :: forall (f :: Type -> Type) x . Ap f x -> (Identity :+: Ap1 f) xfunctor-combinators Data.Functor.Apply.Free Convert an Ap into an Ap1 if possible. If the Ap was "empty", return the Pure value instead.
newtype
NEMapF k1 (f :: k -> Type) (a :: k)functor-combinators Data.Functor.Combinator A non-empty map of f as, indexed by keys of type k. It can be useful for represeting a product of many different values of type f a, each "at" a different k location, where you need to have at least one f a at all times. Can be considered a combination of EnvT and NonEmptyF, in a way --- an NEMapF k f a is like a NonEmptyF (EnvT k f) a with unique (and ordered) keys. See MapF for some use cases.
NEMapF :: NEMap k1 (f a) -> NEMapF k1 (f :: k -> Type) (a :: k)functor-combinators Data.Functor.Combinator No documentation available.
-
functor-combinators Data.Functor.Combinator Swap out both transformed functors at the same time.
hmap :: forall (f :: k -> Type) (g :: k -> Type) . HFunctor t => (f ~> g) -> t f ~> t gfunctor-combinators Data.Functor.Combinator If we can turn an f into a g, then we can turn a t f into a t g. It must be the case that
hmap id == id
Essentially, t f adds some "extra structure" to f. hmap must swap out the functor, without affecting the added structure. For example, ListF f a is essentially a list of f as. If we hmap to swap out the f as for g as, then we must ensure that the "added structure" (here, the number of items in the list, and the ordering of those items) remains the same. So, hmap must preserve the number of items in the list, and must maintain the ordering. The law hmap id == id is a way of formalizing this property.injectContramap :: (Inject t, Contravariant f) => (a -> b) -> f b -> t f afunctor-combinators Data.Functor.Combinator A useful wrapper over the common pattern of contramap-before-inject/inject-and-contramap.
injectMap :: (Inject t, Functor f) => (a -> b) -> f a -> t f bfunctor-combinators Data.Functor.Combinator A useful wrapper over the common pattern of fmap-before-inject/inject-and-fmap.
runMapF :: MapF k1 (f :: k -> Type) (a :: k) -> Map k1 (f a)functor-combinators Data.Functor.Combinator No documentation available.
runNEMapF :: NEMapF k1 (f :: k -> Type) (a :: k) -> NEMap k1 (f a)functor-combinators Data.Functor.Combinator No documentation available.
-
functor-combinators Data.Functor.Invariant.Inplicative A version of gatheredNMap for non-empty NP, but only requiring an Inply instance.