swarm-0.5.0.0: 2D resource gathering game with programmable robots
LicenseBSD-3-Clause
Safe HaskellSafe-Inferred
LanguageHaskell2010

Swarm.Util.Lens

Description

Lens generation utilities.

Synopsis

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/