HORIZON HASKELLDocslts/ghc-10.0.x77a86622026-10-31Search packagesCtrl K
Theme: |

GHC 10.0.0.20260917 · lts/ghc-10.0.x · 77a8662 · 2026-10-31

Moduleap-normalize-0.1.0.1Haskell2010

ApNormalize.DList

This structure is part of the definition of ApNormalize.Aps.

Contents
  1. Applicative difference lists
Synopsis

Applicative difference lists

newtypenewtype ApDList (f :: Type -> Type) a

Type of applicative difference lists.

An applicative transformer which accumulates f-actions in a left-nested composition using (<*>).

ApDList represents a sequence of f-actions u1 :: f x1, ... un :: f xn as "term with a hole" (_ <*> u1 <*> ... <*> un) :: f r.

That hole must have type _ :: f (x1 -> ... -> un -> r); the variable number of arrows is hidden by existential quantification and continuation passing.

To help ensure that syntactic invariant, the Functor and Applicative instances for ApDList have no constraints. liftApDList is the only function whose signature requires an Applicative f constraint, wrapping each action u inside one (<*>).

Constructors

Instances2Functor, Applicative
newtypenewtype Yoneda (f :: Type -> Type) a

A delayed application of fmap which can be fused with an inner fmap or liftA2.

This is the same definition as in the kan-extensions library, but we redefine it to not pay for all the dependencies.

Constructors

  • Yoneda (forall x. (a -> x) -> f x)
Instances1Functor
  • Functor (Yoneda f)Defined in ap-normalize-0.1.0.1 · ApNormalize.DList