| Safe Haskell | None |
|---|---|
| Language | GHC2024 |
Drasil.SRS.ExtractDocDesc
Description
Defines functions to extract certain kinds of information from a document.
Mainly used to pull the UIDs of chunks out of Sentences and Exprs.
Synopsis
- getDocDesc :: DocDesc -> [Sentence]
- egetDocDesc :: DocDesc -> [ModelExpr]
- sentencePlate :: Monoid a => ([Sentence] -> a) -> DLPlate (Constant a :: Type -> Type)
- extractUnits :: DocDesc -> ChunkDB -> [UnitDefn]
Documentation
getDocDesc :: DocDesc -> [Sentence] Source #
Extracts Sentences from a document description.
FIXME: We want all Sentences from a document (not necessarily a document
description), so we use this function. But sentencePlate does not include
all Sentences! Some only appear when rendering (at least, after
mkSections is used on a DocDesc to create `[Section]`).
egetDocDesc :: DocDesc -> [ModelExpr] Source #