| Safe Haskell | Safe-Inferred |
|---|---|
| Language | Haskell2010 |
Language.Drasil.Document.Extractors
Synopsis
- sentToExp :: Sentence -> [ModelExpr]
- extractMExprs :: HasContents a => a -> [ModelExpr]
- extractSents :: HasContents a => a -> [Sentence]
- extractSents' :: HasContents a => [a] -> [Sentence]
- extractChRefs :: HasContents a => [a] -> Set UID
- getSec :: Section -> [Sentence]
- extractSectionsBib :: ChunkDB -> [Section] -> BibRef
- resolveBibliography :: ChunkDB -> Set UID -> [Citation]
Documentation
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 #
extractChRefs :: HasContents a => [a] -> Set UID Source #
Extracts all referenced UIDs from things that have RawContents.
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.