drasil-lang-0.1.60.0: A framework for code and document generation for scientific software - Language SubPackage
Safe HaskellSafe-Inferred
LanguageHaskell2010

Language.Drasil.Document.Extractors

Synopsis

Documentation

sentToExp :: Sentence -> [ModelExpr] Source #

Extracts all ModelExprs mentioned in a Sentence.

extractMExprs :: HasContents a => a -> [ModelExpr] Source #

Extracts ModelExprs from something that HasContents.

extractSents :: HasContents a => a -> [Sentence] Source #

Extracts Sentences from something that HasContents.

extractSents' :: HasContents a => [a] -> [Sentence] Source #

Extracts Sentences from a list of Contents.

extractChRefs :: HasContents a => [a] -> Set UID Source #

Extracts all referenced UIDs from things that have RawContents.

getSec :: Section -> [Sentence] Source #

Extracts Sentences from a Section.

extractSectionsBib :: ChunkDB -> [Section] -> BibRef Source #

Extract bibliography entries from generated sections. This version extracts from fully expanded Sections, capturing citations that are only created during document generation (like those in orgOfDocIntro).

resolveBibliography :: ChunkDB -> Set UID -> [Citation] Source #

Given a ChunkDB and a set of UIDs, looks up the corresponding Citations and returns them sorted by author, year, and title.

FIXME: This function assumes that all UIDs in the set correspond to Citations in the database. If a UID does not correspond to a Citation, it is simply ignored. This should rather rely on a set of 'UIDRef Citation's.