pro-abstract-0.1.0.0: Abstract syntax for writing documents
Safe HaskellNone
LanguageHaskell2010

ProAbstract.Optics

Synopsis

Lenses

content :: HasContent x x' => Lens x x' (Content x) (Content x') Source #

contents :: HasContents x x' => Lens x x' (Seq (Contents x)) (Seq (Contents x')) Source #

Annotation

Metadata

atSetting :: (HasMetadata m, JoinKinds (MetadataOpticKind m) A_Lens k) => Text -> Optic' k NoIx m (Maybe Text) Source #

Select a setting from an item attached to metadata. Returns Nothing if no value is set.

hasProperty :: (HasMetadata m, JoinKinds (MetadataOpticKind m) A_Lens k) => Text -> Optic' k NoIx m Bool Source #

Check if a property is attached to an item with metadata. Using this optic as a setter will add a property if set to True and remove the property when set to False.

properties :: (HasMetadata m, JoinKinds (MetadataOpticKind m) A_Lens k) => Optic' k NoIx m (Set Text) Source #

Fetch all properties from items which contain metadata.

settings :: (HasMetadata m, JoinKinds (MetadataOpticKind m) A_Lens k) => Optic' k NoIx m (Map Text Text) Source #

Fetch all settings defined on items which contain metadata.

Prisms

fork :: CanFork x => Prism' x (Fork x) Source #

Traversals

Annotation

Tags

Metadata

Affine folds