cuddle-0.5.0.0: CDDL Generator and test utilities
Safe HaskellNone
LanguageGHC2021

Codec.CBOR.Cuddle.Huddle.Optics

Description

Optics for mutating Huddle rules

Synopsis

Documentation

commentL :: HasField' "description" a (Maybe Text) => AffineTraversal a a Text Text Source #

Traversal to the comment field of a description. Using this we can for example set the comment with 'a & commentL .~ "This is a comment"'

nameL :: Lens (Named a) (Named a) Text Text Source #

Lens to the name of a rule (or other named entity). Using this we can for example append to the name with 'a & nameL %~ (<> "_1")'