drasil-printers-0.1.10.0: A framework for code and document generation for scientific software - Printers SubPackage
Safe HaskellNone
LanguageGHC2024

Language.Drasil.Printing.Import.ExprCommon

Description

Printing helpers.

Synopsis

Expression-related

parens :: Expr -> Expr Source #

Helper for inserting parentheses.

Symbol and Term Resolution

lookupC :: Stage -> ChunkDB -> UID -> Symbol Source #

Given the stage of the symbol, looks up a character/symbol inside a chunk database that matches the given UID.

lookupSymb :: (IsChunk t, HasSymbol t) => PrintingInformation -> UIDRef t -> Symbol Source #

Look up a symbol given a chunk database and a UID associated with the symbol. Hack: Always uses DefinedQuantityDict as the chunk type to look up, despite that not being the _actual type_ of the chunk being looked up.

Note: It is because of this function that that the `-Wno-redundant-constraints` OPTIONS_GHC pragma is at the top of the file. This is because we technically don't use t at all in the output expression. It can technically be anything!