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

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

  • 2 types
  • 7 values

Formation

1 declaration

Introduction

1 declaration

Elimination

2 declarations

Computation

0 declarations
ipreview (iafolding f) ≡ f

Additional introduction forms

1 declaration

Additional elimination forms

1 declaration

Combinators

1 declaration

Monoid structure

1 declaration

IxAffineFold admits a monoid structure where iafailing combines folds (returning a result from the second fold only if the first returns none) and the identity element is ignored (which returns no results).

Note: There is no isumming equivalent that returns an IxAffineFold, because it would not need to return more than one result.

There is no Semigroup or Monoid instance for IxAffineFold, because there is not a unique choice of monoid to use that works for all optics, and the (<>) operator could not be used to combine optics of different kinds.

Subtyping

1 declaration
datadata An_AffineFold
#

Tag for an affine fold.

Instances27Is, JoinKinds, IxOptic, ToReadOnly, ReadOnlyOptic, …