Safe Haskell | Safe-Inferred |
---|---|
Language | Haskell2010 |
Create the list of Generated Examples for the Drasil website.
Synopsis
- data Example = E {}
- allExampleSI :: [SystemInformation]
- allExampleChoices :: [[Choices]]
- allExamples :: [SystemInformation] -> [[Choices]] -> FilePath -> FilePath -> [Example]
- examples :: FilePath -> FilePath -> [Example]
- fullExList :: FilePath -> FilePath -> RawContent
- allExampleList :: [Example] -> [ItemType]
- individualExList :: Example -> [ItemType]
- versionList :: (Example -> Lang -> String -> Reference) -> Example -> [ItemType]
- showLang :: Lang -> String
- exampleSec :: FilePath -> FilePath -> Section
- exampleTitle :: Sentence
- exampleIntro :: Sentence
- generatedCodeTitle :: String
- generatedCodeDocsTitle :: String
- convertLang :: Lang -> String
- getCodeRef :: Example -> Lang -> String -> Reference
- buildDrasilExSrcRef :: Example -> Reference
- getDoxRef :: Example -> Lang -> String -> Reference
- getSRSRef :: FilePath -> Format -> String -> Reference
- getSRSPath :: FilePath -> Format -> String -> FilePath
- getCodePath :: FilePath -> String -> String -> FilePath
- getDoxPath :: FilePath -> String -> String -> FilePath
- exampleRefs :: FilePath -> FilePath -> [Reference]
- getCodeRefDB :: Example -> [Reference]
- getDoxRefDB :: Example -> [Reference]
- getAbrv :: Example -> String
Gather Example Information
First gather all information needed to create an example. This includes system information, descriptions, and choices. These will also be exported for use in CaseStudy.hs.
Each Example gets placed in here.
E | |
|
allExampleSI :: [SystemInformation] Source #
Records example system information.
allExampleChoices :: [[Choices]] Source #
Records example choices. The order of the list must match up with
that in allExampleSI
, or the Case Studies Table will be incorrect.
allExamples :: [SystemInformation] -> [[Choices]] -> FilePath -> FilePath -> [Example] Source #
Combine system info, description, choices, and file paths into one nice package.
examples :: FilePath -> FilePath -> [Example] Source #
Calls allExamples
on allExampleSI
, allExampleDesc
, and allExampleChoices
.
Can be considered a "default" version of allExamples
.
Functions to create the list of examples
fullExList :: FilePath -> FilePath -> RawContent Source #
Create the full list of examples.
allExampleList :: [Example] -> [ItemType] Source #
Create each example point and call individualExList
to do the rest.
individualExList :: Example -> [ItemType] Source #
Display the points for generated documents and call versionList
to display the code.
versionList :: (Example -> Lang -> String -> Reference) -> Example -> [ItemType] Source #
Takes a function that gets the needed references (either references for the code or doxygen references) and the example to create the list out of. For examples that have more than one version of generated code (more than one set of choices) like Projectile, we generate the code and doxygen references for each.
Examples Section Functions
exampleSec :: FilePath -> FilePath -> Section Source #
Example section function generator. Makes a list of examples and generated artifacts.
exampleTitle :: Sentence Source #
Example section title.
exampleIntro :: Sentence Source #
Example section introduction.
generatedCodeTitle :: String Source #
Example list titles.
generatedCodeDocsTitle :: String Source #
Example list titles.
Helper functions in getting References for SRS, code folders, and Doxygen
convertLang :: Lang -> String Source #
Similar to showLang
, but for use within Drasil for Referencing and UIDs.
getCodeRef :: Example -> Lang -> String -> Reference Source #
Generate a reference towards the code folder. Uses getCodePath
to find the code path.
buildDrasilExSrcRef :: Example -> Reference Source #
Similar to getCodeRef
, but builds the source code references
getDoxRef :: Example -> Lang -> String -> Reference Source #
Similar to getCodeRef
, but gets the doxygen references and uses getDoxRef
instead.
getSRSRef :: FilePath -> Format -> String -> Reference Source #
Make references for each of the generated SRS files.
getSRSPath :: FilePath -> Format -> String -> FilePath Source #
Get the paths of where each reference exist for SRS files. Some example abbreviations have spaces, so we just filter those out.
getCodePath :: FilePath -> String -> String -> FilePath Source #
Uses repoRt
path (codePath in this module).
Get the file paths for generated code and doxygen locations.
getDoxPath :: FilePath -> String -> String -> FilePath Source #
Uses exRt
path (srsDoxPath in this module).
Get the file paths for generated code and doxygen locations.
exampleRefs :: FilePath -> FilePath -> [Reference] Source #
Gather all references used in making the Examples section.
getCodeRefDB :: Example -> [Reference] Source #
Helpers to pull code and doxygen references from an example. Creates a reference for every possible choice in every possible language.
getDoxRefDB :: Example -> [Reference] Source #
Helpers to pull code and doxygen references from an example. Creates a reference for every possible choice in every possible language.