HORIZON HASKELLDocslts/ghc-9.10.xc74966e2026-09-27Search names, modules, packages, or :: a typeCtrl K

GHC 9.10.3 · lts/ghc-9.10.x · c74966e · 2026-09-27

Modulefree-5.2Haskell2010

Control.Alternative.Free

Left distributive Alternative functors for free, based on a design by Stijn van Drongelen.

  • 2 types
  • 3 values
  • Packagefree-5.2
  • Exports5
  • LanguageHaskell2010
  • LicenceBSD-3-Clause
  • SourceFree.hs
newtypenewtype Alt (f :: Type -> Type) a
#

Constructors

Instances7Functor, Applicative, Alternative, Alt, Apply, Semigroup, …
  • Functor (Alt f)Defined in free-5.2 · Control.Alternative.Free
  • Applicative (Alt f)Defined in free-5.2 · Control.Alternative.Free
  • Alternative (Alt f)Defined in free-5.2 · Control.Alternative.Free
  • Alt (Alt f)Defined in free-5.2 · Control.Alternative.Free
  • Apply (Alt f)Defined in free-5.2 · Control.Alternative.Free
  • Semigroup (Alt f a)Defined in free-5.2 · Control.Alternative.Free
  • Monoid (Alt f a)Defined in free-5.2 · Control.Alternative.Free
datadata AltF (f :: Type -> Type) a where
#

Constructors

Instances2Functor, Applicative
  • Functor (AltF f)Defined in free-5.2 · Control.Alternative.Free
  • Applicative (AltF f)Defined in free-5.2 · Control.Alternative.Free
valuerunAlt :: Alternative g => (forall x. f x -> g x) -> Alt f a -> g a
#

Given a natural transformation from f to g, this gives a canonical monoidal natural transformation from Alt f to g.

valueliftAlt :: f a -> Alt f a
#

A version of lift that can be used with any f.

valuehoistAlt :: (forall a. f a -> g a) -> Alt f b -> Alt g b
#

Given a natural transformation from f to g this gives a monoidal natural transformation from Alt f to Alt g.