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

Moduleoptics-core-0.4.2Haskell2010

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.

Contents
  1. Formation
  2. Introduction
  3. Elimination
  4. Computation
  5. Additional introduction forms
  6. Additional elimination forms
  7. Combinators
  8. Monoid structure
  9. Subtyping
Synopsis
  • Packageoptics-core-0.4.2
  • Exports9
  • LanguageHaskell2010
  • LicenceBSD-3-Clause
  • SourceIxAffineFold.hs

Formation

Introduction

Elimination

Computation

ipreview (iafolding f) ≡ f

Additional introduction forms

Additional elimination forms

Combinators

Monoid structure

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

datadata An_AffineFold

Tag for an affine fold.

Instances27Is, JoinKinds, IxOptic, ToReadOnly, ReadOnlyOptic, …