HORIZON HASKELLDocslts/ghc-9.10.xc74966e2026-09-27Search names, modules, packages, or :: a typeCtrl K

GHC 9.10.3 · lts/ghc-9.10.x · c74966e · 2026-09-27

Moduleoptics-th-0.4.1Haskell2010

Optics.TH.Internal.Product

  • 5 types
  • 5 values
  • Packageoptics-th-0.4.1
  • Exports10
  • LanguageHaskell2010
  • LicenceBSD-3-Clause
  • SourceProduct.hs
typetype FieldNamer = Name -> [Name] -> Name -> [DefName]
#

The rule to create function names of lenses for data fields.

Although it's sometimes useful, you won't need the first two arguments most of the time.

datadata DefName
#

Name to give to generated field optics.

Constructors

Instances3Eq, Ord, Show
  • Eq DefNameDefined in optics-th-0.4.1 · Optics.TH.Internal.Product
  • Ord DefNameDefined in optics-th-0.4.1 · Optics.TH.Internal.Product
  • Show DefNameDefined in optics-th-0.4.1 · Optics.TH.Internal.Product
typetype ClassyNamer = Name -> Maybe (Name, Name)
#

The optional rule to create a class and method around a monomorphic data type. If this naming convention is provided, it generates a "classy" lens.

Compute the field optics for the type identified by the given type name. Lenses will be computed when possible, Traversals otherwise.

typetype HasFieldClasses = StateT (Set Name) Q
#

Tracks the field class Names that have been created so far. We consult these so that we may avoid creating duplicate classes.