HORIZON HASKELLDocslts/ghc-10.0.xfc4e5982026-10-11Search names, modules, packages, or :: a typeCtrl K

GHC 10.0.0.20260917 · lts/ghc-10.0.x · fc4e598 · 2026-10-11

Modulelens-5.3.6Haskell2010

Control.Lens.Internal.FieldTH

  • 5 types
  • 3 values
  • Packagelens-5.3.6
  • Exports8
  • LanguageHaskell2010
  • LicenceBSD-2-Clause
  • SourceFieldTH.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 lens-5.3.6 · Control.Lens.Internal.FieldTH
  • Ord DefNameDefined in lens-5.3.6 · Control.Lens.Internal.FieldTH
  • Show DefNameDefined in lens-5.3.6 · Control.Lens.Internal.FieldTH
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.