Safe Haskell | None |
---|---|
Language | Haskell2010 |
Language.Drasil.Printers
Synopsis
- data Format
- data GraphInfo = GI {
- assumpNF :: NodeFamily
- ddNF :: NodeFamily
- gdNF :: NodeFamily
- tmNF :: NodeFamily
- imNF :: NodeFamily
- reqNF :: NodeFamily
- gsNF :: NodeFamily
- chgNF :: NodeFamily
- edgesAvsA :: [(UID, [UID])]
- edgesAvsAll :: [(UID, [UID])]
- edgesRefvsRef :: [(UID, [UID])]
- edgesAllvsR :: [(UID, [UID])]
- edgesAllvsAll :: [(UID, [UID])]
- data NodeFamily = NF {
- nodeUIDs :: [UID]
- nodeLabels :: [Label]
- nfLabel :: Label
- nfColour :: Colour
- outputDot :: FilePath -> GraphInfo -> IO ()
- genHTML :: PrintingInformation -> String -> Document -> Doc
- makeCSS :: Document -> Doc
- makeMd :: [Doc] -> Doc
- introInfo :: String -> [String] -> Doc
- verInfo :: String -> String -> Doc
- unsupOS :: Maybe String -> Doc
- regularSec :: Doc -> Doc -> Doc
- instDoc :: [String] -> Doc
- extLibSec :: [(String, String)] -> [String] -> Doc
- endNote :: [String] -> Doc
- data Linearity
- sentenceDoc :: ChunkDB -> Stage -> Linearity -> Sentence -> Doc
- exprDoc :: ChunkDB -> Stage -> Linearity -> Expr -> Doc
- codeExprDoc :: ChunkDB -> Stage -> Linearity -> CodeExpr -> Doc
- symbolDoc :: Symbol -> Doc
- unitDoc :: Linearity -> USymb -> Doc
- showSymb :: Symbol -> String
- showHasSymbImpl :: HasSymbol x => x -> String
- genTeX :: Document -> PrintingInformation -> Doc
- genJSON :: PrintingInformation -> Document -> Doc
- printAllDebugInfo :: PrintingInformation -> [Doc]
- data PrintingInformation = PI {
- _ckdb :: ChunkDB
- _stg :: Stage
- _configuration :: PrintingConfiguration
- piSys :: SystemInformation -> Stage -> PrintingConfiguration -> PrintingInformation
- class HasPrintingOptions c where
- getSetting :: Lens' c Notation
- data Notation
- defaultConfiguration :: PrintingConfiguration
Formats
DOT
Types
Holds all important and relevant information for generating a traceability graph. Includes nodes, graph edges, and node family information.
Constructors
GI | |
Fields
|
data NodeFamily Source #
A node family contains a list of UID
s, their display labels, general subgraph label, and colour.
Constructors
NF | |
Fields
|
Functions
outputDot :: FilePath -> GraphInfo -> IO () Source #
Creates the directory for output, gathers all individual graph output functions and calls them.
HTML
Printer
genHTML :: PrintingInformation -> String -> Document -> Doc Source #
Generate an HTML document from a Drasil Document
.
Helpers
Markdown
Printer
makeMd :: [Doc] -> Doc Source #
Combines a list of sentences into a final Doc, also appends end note.
Section Printers
unsupOS :: Maybe String -> Doc Source #
Invalid Operating Systems section, does not display unless atleast 1 invalid OS.
instDoc :: [String] -> Doc Source #
Instruction section, contains 3 paragraphs, Running, Building and Config Files. The Config file section is only displayed if there are configuration files.
extLibSec :: [(String, String)] -> [String] -> Doc Source #
External Libraries section. The inputs are a list of name and version pairs and a list of the corresponding version numbers, these are first combined into a list of triplets, and then each printed on a new line.
Plain
Types
Functions
sentenceDoc :: ChunkDB -> Stage -> Linearity -> Sentence -> Doc Source #
Create sentences for a document in Doc
format.
exprDoc :: ChunkDB -> Stage -> Linearity -> Expr -> Doc Source #
Create expressions for a document in Doc
format.
codeExprDoc :: ChunkDB -> Stage -> Linearity -> CodeExpr -> Doc Source #
Create code expressions for a document in Doc
format.
showHasSymbImpl :: HasSymbol x => x -> String Source #
Helper for printing a HasSymbol in Implementation Stage
TeX
Jupyter
genJSON :: PrintingInformation -> Document -> Doc Source #
Generate a python notebook document (using json).
Log
printAllDebugInfo :: PrintingInformation -> [Doc] Source #
Gathers all printing functions and creates the debugging tables from them.
Printing Information and Options
data PrintingInformation Source #
Printing information contains a database, a stage, and a printing configuration.
Instances
HasPrintingOptions PrintingInformation Source # | Finds the notation used for the |
Defined in Language.Drasil.Printing.PrintingInformation Methods getSetting :: Lens' PrintingInformation Notation Source # |
piSys :: SystemInformation -> Stage -> PrintingConfiguration -> PrintingInformation Source #
Builds a document's printing information based on the system information.
class HasPrintingOptions c where Source #
Able to be printed.
Instances
HasPrintingOptions PrintingInformation Source # | Finds the notation used for the |
Defined in Language.Drasil.Printing.PrintingInformation Methods getSetting :: Lens' PrintingInformation Notation Source # |
Notation can be scientific or for engineering.
Constructors
Scientific | |
Engineering |
defaultConfiguration :: PrintingConfiguration Source #
Default configuration is for engineering.