HORIZON HASKELLDocslts/ghc-10.0.x8fef28d2026-11-02Search packagesCtrl K
Theme: |

GHC 10.0.0.20260917 · lts/ghc-10.0.x · 8fef28d · 2026-11-02

Moduleoptics-th-0.4.1Haskell2010

Optics.TH.Internal.Product

Synopsis
  • 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.