drasil-docLang-0.1.26.0: A framework for code and document generation for scientific software - Document Language SubPackage
Safe HaskellSafe-Inferred
LanguageHaskell2010

Drasil.GetChunks

Description

Utilities to get grab certain chunks (from Expr, Sentence, etc) by UID and dereference the chunk it refers to.

Synopsis

Documentation

ccss :: [Sentence] -> [ModelExpr] -> ChunkDB -> [DefinedQuantityDict] Source #

Gets a list of defined quantities (DefinedQuantityDicts) from Sentences and expressions that are contained in the database (ChunkDB).

ccss' :: [Sentence] -> [ModelExpr] -> ChunkDB -> [DefinedQuantityDict] Source #

Gets a list of quantities (DefinedQuantityDicts) from Sentences and expressions that are contained in the database (ChunkDB).

combine :: Sentence -> ChunkDB -> [DefinedQuantityDict] Source #

Combines the functions of vars and concpt to create a list of DefinedQuantityDicts from a Sentence.

vars :: ModelExpr -> ChunkDB -> [DefinedQuantityDict] Source #

Gets a list of quantities (DefinedQuantityDict) from an equation in order to print.

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.