HORIZON HASKELLDocslts/ghc-9.10.x248f8f02026-10-05Search names, modules, packages, or :: a typeCtrl K

GHC 9.10.3 · lts/ghc-9.10.x · 248f8f0 · 2026-10-05

Moduleoptics-core-0.4.1.1Haskell2010

Optics.Internal.Optic.Subtyping

Instances to implement the subtyping hierarchy between optics.

This module is intended for internal use only, and may change without warning in subsequent releases.

  • 10 types
  • 2 classes
classclass Is (k :: OpticKind) (l :: OpticKind) where
#

Subtyping relationship between kinds of optics.

An instance of Is k l means that any Optic k can be used as an Optic l. For example, we have an Is A_Lens A_Traversal instance, but not Is A_Traversal A_Lens.

This class needs instances for all possible combinations of tags.

Methods

Instances38Is, …
familytype family EliminationForms (k :: OpticKind) :: ([(Symbol, Symbol)], [Symbol]) where
#
typetype FoldEliminations = '('['("traverseOf_", "Optics.Fold"), '("foldMapOf", "Optics.Fold"), '("toListOf", "Optics.Fold")], '["(^..)"])
#
typetype SetterEliminations = '('['("over", "Optics.Setter"), '("set", "Optics.Setter")], '["(%~)", "(.~)"])
#
classclass JoinKinds (k :: OpticKind) (l :: OpticKind) (m :: OpticKind) | k l -> m where
#

Computes the least upper bound of two optics kinds.

In presence of a JoinKinds k l m constraint Optic m represents the least upper bound of an Optic k and an Optic l. This means in particular that composition of an Optic k and an Optic k will yield an Optic m.

Methods

Instances105JoinKinds, …