Copyright | © 2020 James Alexander Feldman-Crough © 2022 Mission Valley Software LLC |
---|---|
License | MPL-2.0 |
Safe Haskell | None |
Language | Haskell2010 |
Document
Document is the root of the tree.
Tagged nodes
Tagged nodes are branch points within a document.
Tag
= (name
:Text
) × (metadata
:Metadata
) × (annotation
:Annotation
)Tagged
x = (tag
:Tag
) × (content
: x)
Tagged
is a data family, where the type parameter corresponds to the type of content under the tag. There are three instances of this family:
Optics:
tag
targets the tag at a node; it is either a prism or an affine traversal, depending on the node type.- The
allTags
traversal targets every tag at and below a node. - The
allBlockTags
andallInlineTags
also target tags at or below a node, but are limited to tags at the block or inline level, respectively. - Since a tag has metadata, all of the optics for targeting parts of metadata (e.g.
atSetting
andhasProperty
) are also available onTag
and onTagged
nodes.
Operations for altering tags and/or removing tagged nodes in bulk:
- Pure:
mapMaybeTags
,mapMaybeBlockTags
,mapMaybeInlineTags
- Monadic:
witherTags
,witherBlockTags
,witherInlineTags
The Block level
Block-level content is everything that appears below the document level and above the paragraph level.
There are three kinds of block:
Fork blocks contain more blocks.
Plain blocks contain text.
Tagged
PlainBlock
= (tag
:Tag
) × (content
:PlainBlock
)PlainBlock
= (contents
:Fragment
) × (annotation
:Annotation
)
Paragraphs contain inline content.
Paragraph
= (content
:Lines
) × (annotation
:Annotation
)
Unenforced guideline: The Lines
of a Paragraph
should contain at least one Line
.
BlockTag
A BlockTag is a non-paragraph Block.
The Block type can be described in terms of BlockTag as:
Example:
is an affine fold that targets blocks with a tag name of "h1".blockTag
% filtered
(x -> view
name
x == "h1")
The Inline level
Inline-level content is everything below the paragraph level.
Inline content is grouped into lines; we specify no particular semantics of line breaks but suggest that a typical consumer of Lines
will fold them together with a single space character interspersed between the lines.
There are two kinds of inline:
Fork inlines contain more inlines.
- Plain inlines contain text.
Unenforced guideline: Each Line
should contain at least one Inline
.
Fragments
Fragments are all the little scraps of text that serve as the leaves of the document tree.
Fragment
= (content
:Text
) × (annotation
:Annotation
)
A fragment may appear at the inline level as a plain Inline
, or at the block level as a line of a PlainBlock
.
Unenforced guidelines: Fragment text should be non-empty, and it should not contain any line break characters.
Metadata
Documents and tags both have metadata.
Optics:
metadata
targets the metadata of a node; it is either a prism or an affine traversal, depending on the node type.atSetting
andhasProperty
target specific parts of metadata by name.- The
allMetadata
traversal targets every metadata at and under a node.
Content
The content of a node is whatever is nested directly under it in the document tree. The content
lens is overloaded via the Content
type family and HasContent
class.
The contents of a node is the type of sequence element most directly nested under it. The contents
lens is via the Contents
type family and HasContents
class.
List of nodes and their content types:
x | Content x | Contents x |
Document | Blocks | Block |
Blocks | — | Block |
Paragraph | Lines | Line |
Lines | — | Line |
Line | — | Inline |
PlainBlock | — | Fragment |
Tagged y | y | Contents y |
Fragment | Text | — |
HasContent
and HasContents
have type aliases HasContents'
and HasContents'
respectively for types that only support simple optics.
Fork and plain
At both the block and inline level, a node may be a fork that contains a sequence of more content at the same level, and a node may be plain node that just contains text.
The fork
prism is overloaded via the Fork
type family and CanFork
class. List of nodes and their fork types:
x | Fork x |
Block | Tagged Blocks |
Inline | Tagged Lines |
The plain
prism is overloaded via the Plain
type family and CanBePlain
class. List of nodes and their plain types:
x | Plain x |
Block | Tagged PlainBlock |
Inline | Fragment |
(Block
also has a third prism, paragraph
, which is neither fork nor plain.)
Annotation
An annotation is attached to every Tag
, PlainBlock
, Paragraph
, Line
, and Fragment
. The Annotation
type may be anything, but its original purpose was to map each component of a document to the location where it appeared in a text file.
Optics:
- The
annotation
lens targets a single annotation at a node - The
allAnnotations
traversal targets every annotation at and under a node.
Modules
The ProAbstract module provides everything in the pro-abstract package. There are also some smaller collections of reëxports.
Organized by topic:
- ProAbstract.Annotation
- ProAbstract.Content
- ProAbstract.Metadata
- ProAbstract.Structure
- ProAbstract.Tag
- ProAbstract.Tagless
Organized by kind of thing:
- ProAbstract.Types — The essential types, exported abstractly. Includes type families and data families.
- ProAbstract.Optics — Lenses, prisms, traversals, etc. Many of these are class methods, but are exported here without their classes.
- ProAbstract.Datatypes — Datatypes including with their constructors and record fields
- ProAbstract.Families — Type families and data families.
- ProAbstract.Classes — Typeclasses, mostly for the polymorphic optics.
Synopsis
- data Document ann = Document {
- documentMetadata :: Metadata
- documentContent :: Blocks ann
- data Block ann
- = BlockPlain (Tagged (PlainBlock ann))
- | BlockParagraph (Paragraph ann)
- | BlockFork (Tagged (Blocks ann))
- newtype Blocks ann = Blocks (Seq (Block ann))
- data Paragraph ann = Paragraph {
- paragraphContent :: Lines ann
- paragraphAnnotation :: ann
- class HasManyParagraphs x where
- allParagraphs :: Traversal' x (Paragraph (Annotation x))
- data BlockTag ann
- = BlockTagFork (Tagged (Blocks ann))
- | BlockTagPlain (Tagged (PlainBlock ann))
- blockTag :: Prism' (Block ann) (BlockTag ann)
- data Inline ann
- = InlineFork (Tagged (Lines ann))
- | InlinePlain (Fragment ann)
- data Line ann = Line {
- lineInlines :: Seq (Inline ann)
- lineAnnotation :: ann
- newtype Lines ann = Lines (Seq (Line ann))
- data Fragment ann = Fragment {
- fragmentText :: Text
- fragmentAnnotation :: ann
- data PlainBlock ann = PlainBlock {
- plainBlockLines :: Seq (Fragment ann)
- plainBlockAnnotation :: ann
- class HasManyPlainInlines x where
- allPlainInlines :: Traversal' x (Fragment (Annotation x))
- class HasManyPlainBlocks x where
- allPlainBlocks :: Traversal' x (Tagged (PlainBlock (Annotation x)))
- data Tag ann = Tag {
- tagName :: Text
- tagMetadata :: Metadata
- tagAnnotation :: ann
- data family Tagged con
- name :: (HasTag x, JoinKinds (TagOpticKind x) A_Lens k) => Optic' k NoIx x Text
- class HasTag x where
- type TagOpticKind x :: OpticKind
- tag :: Optic' (TagOpticKind x) NoIx x (Tag (Annotation x))
- class HasManyTags x where
- allTags :: Traversal' x (Tag (Annotation x))
- allInlineTags :: Traversal' x (Tag (Annotation x))
- class HasManyTags x => HasManyBlockTags x where
- allBlockTags :: Traversal' x (Tag (Annotation x))
- class HasWitherableTags x where
- witherTags :: Monad f => (Tag (Annotation x) -> f (Maybe (Tag (Annotation x)))) -> x -> f x
- mapMaybeTags :: (Tag (Annotation x) -> Maybe (Tag (Annotation x))) -> x -> x
- class HasManyTags x => HasWitherableInlineTags x where
- witherInlineTags :: Monad f => (Tag (Annotation x) -> f (Maybe (Tag (Annotation x)))) -> x -> f x
- mapMaybeInlineTags :: (Tag (Annotation x) -> Maybe (Tag (Annotation x))) -> x -> x
- class HasManyBlockTags x => HasWitherableBlockTags x where
- witherBlockTags :: Monad f => (Tag (Annotation x) -> f (Maybe (Tag (Annotation x)))) -> x -> f x
- mapMaybeBlockTags :: (Tag (Annotation x) -> Maybe (Tag (Annotation x))) -> x -> x
- type family Plain a
- class CanBePlain x where
- type family Fork a
- class CanFork x where
- paragraph :: Prism' (Block ann) (Paragraph ann)
- data Metadata = Metadata {}
- class HasMetadata x where
- type MetadataOpticKind x
- metadata :: Optic' (MetadataOpticKind x) NoIx x Metadata
- class HasManyMetadata x where
- properties :: (HasMetadata m, JoinKinds (MetadataOpticKind m) A_Lens k) => Optic' k NoIx m (Set Text)
- hasProperty :: (HasMetadata m, JoinKinds (MetadataOpticKind m) A_Lens k) => Text -> Optic' k NoIx m Bool
- settings :: (HasMetadata m, JoinKinds (MetadataOpticKind m) A_Lens k) => Optic' k NoIx m (Map Text Text)
- atSetting :: (HasMetadata m, JoinKinds (MetadataOpticKind m) A_Lens k) => Text -> Optic' k NoIx m (Maybe Text)
- type family Content a
- class HasContent x x' where
- type HasContent' x = HasContent x x
- type family Contents a
- class HasContents x x' where
- type HasContents' x = HasContents x x
- type family Annotation x
- class HasAnnotation x x' where
- annotation :: Lens x x' (Annotation x) (Annotation x')
- type HasAnnotation' x = HasAnnotation x x
- class HasManyAnnotations x x' where
- allAnnotations :: Traversal x x' (Annotation x) (Annotation x')
- class CanBeTagless a where
- tagless :: KindOfText txt -> AffineFold a txt
- class CanHaveTaglessContent a where
- taglessContent :: KindOfText t -> AffineFold a t
- data KindOfText txt where
- TextLine :: KindOfText Text
- TextStanza :: KindOfText (Seq Text)
- TextParagraphs :: KindOfText (Seq (Seq Text))
Document
Instances
Blocks
BlockPlain (Tagged (PlainBlock ann)) | |
BlockParagraph (Paragraph ann) | |
BlockFork (Tagged (Blocks ann)) |
Instances
Instances
Paragraphs
A collection of Lines
. A Paragraph
represents the border between block and inline contexts. All ancestors of a paragraph are block items or a document, and all children are inline items.
Instances
class HasManyParagraphs x where Source #
allParagraphs :: Traversal' x (Paragraph (Annotation x)) Source #
Instances
HasManyParagraphs (Tagged (Blocks ann)) Source # | |
Defined in ProAbstract.Structure.Block allParagraphs :: Traversal' (Tagged (Blocks ann)) (Paragraph (Annotation (Tagged (Blocks ann)))) Source # | |
HasManyParagraphs (Blocks ann) Source # | |
Defined in ProAbstract.Structure.Block allParagraphs :: Traversal' (Blocks ann) (Paragraph (Annotation (Blocks ann))) Source # | |
HasManyParagraphs (Block ann) Source # | |
Defined in ProAbstract.Structure.Block allParagraphs :: Traversal' (Block ann) (Paragraph (Annotation (Block ann))) Source # | |
HasManyParagraphs (Document ann) Source # | |
Defined in ProAbstract.Structure.Document allParagraphs :: Traversal' (Document ann) (Paragraph (Annotation (Document ann))) Source # | |
HasManyParagraphs (BlockTag ann) Source # | |
Defined in ProAbstract.Structure.BlockTag allParagraphs :: Traversal' (BlockTag ann) (Paragraph (Annotation (BlockTag ann))) Source # |
Tag blocks
BlockTagFork (Tagged (Blocks ann)) | |
BlockTagPlain (Tagged (PlainBlock ann)) |
Instances
Lines
InlineFork (Tagged (Lines ann)) | |
InlinePlain (Fragment ann) |
Instances
Line | |
|
Instances
Instances
Plain text
Instances
data PlainBlock ann Source #
Instances
class HasManyPlainInlines x where Source #
allPlainInlines :: Traversal' x (Fragment (Annotation x)) Source #
Instances
class HasManyPlainBlocks x where Source #
allPlainBlocks :: Traversal' x (Tagged (PlainBlock (Annotation x))) Source #
Instances
HasManyPlainBlocks (Tagged (Blocks ann)) Source # | |
Defined in ProAbstract.Structure.Block allPlainBlocks :: Traversal' (Tagged (Blocks ann)) (Tagged (PlainBlock (Annotation (Tagged (Blocks ann))))) Source # | |
HasManyPlainBlocks (Blocks ann) Source # | |
Defined in ProAbstract.Structure.Block allPlainBlocks :: Traversal' (Blocks ann) (Tagged (PlainBlock (Annotation (Blocks ann)))) Source # | |
HasManyPlainBlocks (Block ann) Source # | |
Defined in ProAbstract.Structure.Block allPlainBlocks :: Traversal' (Block ann) (Tagged (PlainBlock (Annotation (Block ann)))) Source # | |
HasManyPlainBlocks (Document ann) Source # | |
Defined in ProAbstract.Structure.Document allPlainBlocks :: Traversal' (Document ann) (Tagged (PlainBlock (Annotation (Document ann)))) Source # | |
HasManyPlainBlocks (BlockTag ann) Source # | |
Defined in ProAbstract.Structure.BlockTag allPlainBlocks :: Traversal' (BlockTag ann) (Tagged (PlainBlock (Annotation (BlockTag ann)))) Source # |
Tags
Instances
data family Tagged con Source #
Instances
type TagOpticKind x :: OpticKind Source #
tag :: Optic' (TagOpticKind x) NoIx x (Tag (Annotation x)) Source #
Instances
HasTag (Tag ann) Source # | |
Defined in ProAbstract.Tag.HasTag type TagOpticKind (Tag ann) Source # | |
HasTag (Tagged (PlainBlock ann)) Source # | |
Defined in ProAbstract.Structure.PlainBlock type TagOpticKind (Tagged (PlainBlock ann)) Source # tag :: Optic' (TagOpticKind (Tagged (PlainBlock ann))) NoIx (Tagged (PlainBlock ann)) (Tag (Annotation (Tagged (PlainBlock ann)))) Source # | |
HasTag (Tagged (Lines ann)) Source # | |
Defined in ProAbstract.Structure.Inline type TagOpticKind (Tagged (Lines ann)) Source # | |
HasTag (Tagged (Blocks ann)) Source # | |
Defined in ProAbstract.Structure.Block type TagOpticKind (Tagged (Blocks ann)) Source # | |
HasTag (Inline ann) Source # | |
Defined in ProAbstract.Structure.Inline type TagOpticKind (Inline ann) Source # | |
HasTag (Block ann) Source # | |
Defined in ProAbstract.Structure.Block type TagOpticKind (Block ann) Source # | |
HasTag (BlockTag ann) Source # | |
Defined in ProAbstract.Structure.BlockTag type TagOpticKind (BlockTag ann) Source # |
Traversal
class HasManyTags x where Source #
allTags :: Traversal' x (Tag (Annotation x)) Source #
allInlineTags :: Traversal' x (Tag (Annotation x)) Source #
Instances
class HasManyTags x => HasManyBlockTags x where Source #
allBlockTags :: Traversal' x (Tag (Annotation x)) Source #
Instances
HasManyBlockTags (Tagged (Blocks ann)) Source # | |
Defined in ProAbstract.Structure.Block allBlockTags :: Traversal' (Tagged (Blocks ann)) (Tag (Annotation (Tagged (Blocks ann)))) Source # | |
HasManyBlockTags (Blocks ann) Source # | |
Defined in ProAbstract.Structure.Block allBlockTags :: Traversal' (Blocks ann) (Tag (Annotation (Blocks ann))) Source # | |
HasManyBlockTags (Block ann) Source # | |
Defined in ProAbstract.Structure.Block allBlockTags :: Traversal' (Block ann) (Tag (Annotation (Block ann))) Source # | |
HasManyBlockTags (Document ann) Source # | |
Defined in ProAbstract.Structure.Document allBlockTags :: Traversal' (Document ann) (Tag (Annotation (Document ann))) Source # |
Withering
class HasWitherableTags x where Source #
witherTags :: Monad f => (Tag (Annotation x) -> f (Maybe (Tag (Annotation x)))) -> x -> f x Source #
mapMaybeTags :: (Tag (Annotation x) -> Maybe (Tag (Annotation x))) -> x -> x Source #
Instances
class HasManyTags x => HasWitherableInlineTags x where Source #
witherInlineTags :: Monad f => (Tag (Annotation x) -> f (Maybe (Tag (Annotation x)))) -> x -> f x Source #
mapMaybeInlineTags :: (Tag (Annotation x) -> Maybe (Tag (Annotation x))) -> x -> x Source #
Instances
class HasManyBlockTags x => HasWitherableBlockTags x where Source #
witherBlockTags :: Monad f => (Tag (Annotation x) -> f (Maybe (Tag (Annotation x)))) -> x -> f x Source #
mapMaybeBlockTags :: (Tag (Annotation x) -> Maybe (Tag (Annotation x))) -> x -> x Source #
Instances
HasWitherableBlockTags (Blocks ann) Source # | |
Defined in ProAbstract.Structure.Block witherBlockTags :: Monad f => (Tag (Annotation (Blocks ann)) -> f (Maybe (Tag (Annotation (Blocks ann))))) -> Blocks ann -> f (Blocks ann) Source # mapMaybeBlockTags :: (Tag (Annotation (Blocks ann)) -> Maybe (Tag (Annotation (Blocks ann)))) -> Blocks ann -> Blocks ann Source # | |
HasWitherableBlockTags (Document ann) Source # | |
Defined in ProAbstract.Structure.Document witherBlockTags :: Monad f => (Tag (Annotation (Document ann)) -> f (Maybe (Tag (Annotation (Document ann))))) -> Document ann -> f (Document ann) Source # mapMaybeBlockTags :: (Tag (Annotation (Document ann)) -> Maybe (Tag (Annotation (Document ann)))) -> Document ann -> Document ann Source # |
Prisms
Plain
Instances
type Plain (Inline ann) Source # | |
Defined in ProAbstract.Structure.Inline | |
type Plain (Block ann) Source # | |
Defined in ProAbstract.Structure.Block | |
type Plain (BlockTag ann) Source # | |
Defined in ProAbstract.Structure.BlockTag |
class CanBePlain x where Source #
Instances
CanBePlain (Inline ann) Source # | |
CanBePlain (Block ann) Source # | |
CanBePlain (BlockTag ann) Source # | |
Fork
Instances
type Fork (Inline ann) Source # | |
Defined in ProAbstract.Structure.Inline | |
type Fork (Block ann) Source # | |
Defined in ProAbstract.Structure.Block | |
type Fork (BlockTag ann) Source # | |
Defined in ProAbstract.Structure.BlockTag |
Paragraph
Metadata
A set of properties and settings, associated with a document or tag.
The namespaces of properties and settings are distinct; a property can share a name with a setting without conflict.
Instances
Eq Metadata Source # | |
Show Metadata Source # | |
Generic Metadata Source # | |
Semigroup Metadata Source # | |
Monoid Metadata Source # | |
NFData Metadata Source # | |
Defined in ProAbstract.Metadata.MetadataType | |
Hashable Metadata Source # | |
Defined in ProAbstract.Metadata.MetadataType | |
HasMetadata Metadata Source # | |
Defined in ProAbstract.Metadata.HasMetadata type MetadataOpticKind Metadata Source # | |
type Rep Metadata Source # | |
Defined in ProAbstract.Metadata.MetadataType type Rep Metadata = D1 ('MetaData "Metadata" "ProAbstract.Metadata.MetadataType" "pro-abstract-0.1.0.0-fAo99Omz3u7l2SA6DiDR2" 'False) (C1 ('MetaCons "Metadata" 'PrefixI 'True) (S1 ('MetaSel ('Just "metadataProperties") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Set Text)) :*: S1 ('MetaSel ('Just "metadataSettings") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Map Text Text)))) | |
type MetadataOpticKind Metadata Source # | |
Defined in ProAbstract.Metadata.HasMetadata |
class HasMetadata x where Source #
type MetadataOpticKind x Source #
Instances
class HasManyMetadata x where Source #
allMetadata :: Traversal' x Metadata Source #
Instances
Properties
properties :: (HasMetadata m, JoinKinds (MetadataOpticKind m) A_Lens k) => Optic' k NoIx m (Set Text) Source #
Fetch all properties from items which contain metadata.
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
.
Settings
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.
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.
Content
type family Content a Source #
Instances
type Content (Fragment ann) Source # | |
Defined in ProAbstract.Structure.Fragment | |
type Content (Tagged (PlainBlock ann)) Source # | |
Defined in ProAbstract.Structure.PlainBlock | |
type Content (Tagged (Lines ann)) Source # | |
Defined in ProAbstract.Structure.Inline | |
type Content (Tagged (Blocks ann)) Source # | |
Defined in ProAbstract.Structure.Block | |
type Content (Paragraph ann) Source # | |
Defined in ProAbstract.Structure.Paragraph | |
type Content (Document ann) Source # | |
Defined in ProAbstract.Structure.Document |
class HasContent x x' where Source #
Instances
HasContent (Fragment ann) (Fragment ann) Source # | |
HasContent (Tagged (PlainBlock ann)) (Tagged (PlainBlock ann)) Source # | |
Defined in ProAbstract.Structure.PlainBlock content :: Lens (Tagged (PlainBlock ann)) (Tagged (PlainBlock ann)) (Content (Tagged (PlainBlock ann))) (Content (Tagged (PlainBlock ann))) Source # | |
HasContent (Tagged (Lines ann)) (Tagged (Lines ann)) Source # | |
HasContent (Tagged (Blocks ann)) (Tagged (Blocks ann)) Source # | |
HasContent (Paragraph ann) (Paragraph ann) Source # | |
HasContent (Document ann) (Document ann') Source # | |
type HasContent' x = HasContent x x Source #
Contents
type family Contents a Source #
Instances
type Contents (Tagged (PlainBlock ann)) Source # | |
Defined in ProAbstract.Structure.PlainBlock | |
type Contents (Tagged (Lines ann)) Source # | |
Defined in ProAbstract.Structure.Inline | |
type Contents (Tagged (Blocks ann)) Source # | |
Defined in ProAbstract.Structure.Block | |
type Contents (PlainBlock ann) Source # | |
Defined in ProAbstract.Structure.PlainBlock | |
type Contents (Lines ann) Source # | |
Defined in ProAbstract.Structure.Inline | |
type Contents (Line ann) Source # | |
Defined in ProAbstract.Structure.Inline | |
type Contents (Paragraph ann) Source # | |
Defined in ProAbstract.Structure.Paragraph | |
type Contents (Blocks ann) Source # | |
Defined in ProAbstract.Structure.Block | |
type Contents (Document ann) Source # | |
Defined in ProAbstract.Structure.Document |
class HasContents x x' where Source #
Instances
HasContents (Tagged (PlainBlock ann)) (Tagged (PlainBlock ann)) Source # | |
Defined in ProAbstract.Structure.PlainBlock contents :: Lens (Tagged (PlainBlock ann)) (Tagged (PlainBlock ann)) (Seq (Contents (Tagged (PlainBlock ann)))) (Seq (Contents (Tagged (PlainBlock ann)))) Source # | |
HasContents (Tagged (Lines ann)) (Tagged (Lines ann)) Source # | |
HasContents (Tagged (Blocks ann)) (Tagged (Blocks ann)) Source # | |
HasContents (PlainBlock ann) (PlainBlock ann) Source # | |
Defined in ProAbstract.Structure.PlainBlock contents :: Lens (PlainBlock ann) (PlainBlock ann) (Seq (Contents (PlainBlock ann))) (Seq (Contents (PlainBlock ann))) Source # | |
HasContents (Lines ann) (Lines ann') Source # | |
HasContents (Line ann) (Line ann) Source # | |
HasContents (Paragraph ann) (Paragraph ann) Source # | |
HasContents (Blocks ann) (Blocks ann') Source # | |
HasContents (Document ann) (Document ann') Source # | |
type HasContents' x = HasContents x x Source #
Annotation
type family Annotation x Source #
Instances
class HasAnnotation x x' where Source #
annotation :: Lens x x' (Annotation x) (Annotation x') Source #
Instances
type HasAnnotation' x = HasAnnotation x x Source #
class HasManyAnnotations x x' where Source #
allAnnotations :: Traversal x x' (Annotation x) (Annotation x') Source #
Instances
Tagless content
class CanBeTagless a where Source #
tagless :: KindOfText txt -> AffineFold a txt Source #
Instances
class CanHaveTaglessContent a where Source #
taglessContent :: KindOfText t -> AffineFold a t Source #
Instances
data KindOfText txt where Source #
TextLine :: KindOfText Text | |
TextStanza :: KindOfText (Seq Text) | |
TextParagraphs :: KindOfText (Seq (Seq Text)) |