License | BSD-3-Clause |
---|---|
Safe Haskell | Safe-Inferred |
Language | Haskell2010 |
Lens generation utilities.
Synopsis
- makeLensesNoSigs :: Name -> DecsQ
- makeLensesExcluding :: [Name] -> Name -> DecsQ
Documentation
makeLensesNoSigs :: Name -> DecsQ Source #
Generate lenses but with no type signatures, so we can explicitly give type signatures and attach custom Haddock documentation to them.
makeLensesExcluding :: [Name] -> Name -> DecsQ Source #
Generate lenses for the fields of a record type (with no type signatures), except for a given list of excluded fields.
Especially useful in conjunction with the design pattern described in https://byorgey.wordpress.com/2021/09/17/automatically-updated-cached-views-with-lens/