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.IxAffineTraversal

An IxAffineTraversal is an indexed version of an AffineTraversal. See the "Indexed optics" section of the overview documentation in the Optics module of the main optics package for more details on indexed optics.

  • 5 types
  • 5 values
  • Packageoptics-core-0.4.1.1
  • Exports10
  • LanguageHaskell2010
  • LicenceBSD-3-Clause
  • SourceIxAffineTraversal.hs

Formation

2 declarations

Introduction

1 declaration

Elimination

0 declarations

An IxAffineTraversal is in particular an IxAffineFold and an IxSetter, therefore you can specialise types to obtain:

ipreview :: IxAffineTraversal i s t a b -> s -> Maybe (i, a)
iover    :: IxAffineTraversal i s t a b -> (i -> a -> b) -> s -> t
iset     :: IxAffineTraversal i s t a b -> (i      -> b) -> s -> t

Combinators

1 declaration

Additional introduction forms

1 declaration

Subtyping

1 declaration
datadata An_AffineTraversal
#

Tag for an affine traversal.

Instances30Is, ArrowOptic, JoinKinds, IxOptic, ToReadOnly, ReadOnlyOptic, …

van Laarhoven encoding

4 declarations
typetype IxAffineTraversalVL i s t a b = forall (f :: Type -> Type). Functor f => (forall r. r -> f r) -> (i -> a -> f b) -> s -> f t
#

Type synonym for a type-modifying van Laarhoven indexed affine traversal.

Note: this isn't exactly van Laarhoven representation as there is no Pointed class (which would be a superclass of Applicative that contains pure but not <*>). You can interpret the first argument as a dictionary of Pointed that supplies the point function (i.e. the implementation of pure).