Copyright | (c) 2019-2020 Vaclav Svejcar |
---|---|
License | BSD-3-Clause |
Maintainer | vaclav.svejcar@gmail.com |
Stability | experimental |
Portability | POSIX |
Safe Haskell | None |
Language | Haskell2010 |
Provides customized versions of lens functions.
Synopsis
- suffixLenses :: Name -> DecsQ
- suffixLensesFor :: [String] -> Name -> DecsQ
Documentation
suffixLenses :: Name -> DecsQ Source #
A template haskell function to build lenses for a record type. This
function differs from the makeLenses
function in that
it does not require the record fields to be prefixed with underscores
and it adds an L suffix to lens names to make it clear that they
are lenses.
suffixLensesFor :: [String] -> Name -> DecsQ Source #
Same as suffixLensesFor
, but build lenses only for selected fields.