| Safe Haskell | Safe-Inferred |
|---|---|
| Language | Haskell2010 |
Drasil.Generator
Synopsis
- caseStudyMainSRS :: SmithEtAlSRS -> SRSDecl -> String -> IO ()
- caseStudyMainSRSWCode :: SmithEtAlSRS -> SRSDecl -> String -> Choices -> IO ()
- caseStudyMainSRSWCodeZoo :: SmithEtAlSRS -> SRSDecl -> String -> [Choices] -> IO ()
- genCode :: SmithEtAlSRS -> Choices -> IO FileLayout
- genCodeZoo :: SmithEtAlSRS -> [Choices] -> IO [FileLayout]
- codedDirName :: String -> Choices -> String
- withCommonKnowledge :: [Reference] -> [DefinedQuantityDict] -> [IdeaDict] -> [CI] -> [ConceptChunk] -> [UnitDefn] -> [DataDefinition] -> [InstanceModel] -> [GenDefn] -> [TheoryModel] -> [ConceptInstance] -> [Citation] -> [LabelledContent] -> ChunkDB
- type Filename = String
- data Format
- drasilMakefileReqOpts :: WriteOptions
- concretizeAndWrite :: ToFiles sys concOpts => sys -> concOpts -> WriteOptions -> IO ()
- setSystemLocale :: IO ()
- data WriteOptions = WO {
- overwritePolicy :: OverwritePolicy
- localDirName :: forall sys. HasSystemMeta sys => sys -> PathSegment
- textEncoding :: TextEncoding
- debugDataPolicy :: DebugDataPolicy
- data DebugDataPolicy
Documentation
caseStudyMainSRS :: SmithEtAlSRS -> SRSDecl -> String -> IO () Source #
A case study that only outputs an SRS in each of our supported variants.
caseStudyMainSRSWCode :: SmithEtAlSRS -> SRSDecl -> String -> Choices -> IO () Source #
A case study that outputs both an SRS in each of our supported variants as well as a single chosen software artifact in optionally many programming languages.
caseStudyMainSRSWCodeZoo :: SmithEtAlSRS -> SRSDecl -> String -> [Choices] -> IO () Source #
The same as caseStudyMainSRSWCode, except it also produces a
JupyterNotebook-based lesson plan.
Generators
genCode :: SmithEtAlSRS -> Choices -> IO FileLayout Source #
Generate an ICO-style executable software artifact.
genCodeZoo :: SmithEtAlSRS -> [Choices] -> IO [FileLayout] Source #
Internal Functions
codedDirName :: String -> Choices -> String Source #
Find name of folders created for a "zoo" of executable softifacts.
FIXME: This is a hack. The generation phase should emit what artifacts it created.
Common Background Knowledge for Drasil's Science-focused Case Studies
withCommonKnowledge :: [Reference] -> [DefinedQuantityDict] -> [IdeaDict] -> [CI] -> [ConceptChunk] -> [UnitDefn] -> [DataDefinition] -> [InstanceModel] -> [GenDefn] -> [TheoryModel] -> [ConceptInstance] -> [Citation] -> [LabelledContent] -> ChunkDB Source #
Create a ChunkDB containing background knowledge common to all of
Drasil's existing case studies. This means knowledge related to the
SmithEtAl-esque SRS, mathematics, physics, general science, basic software,
and general documentation.
Types (Printing Options)
type Filename = String Source #
When choosing your document, you must specify the filename for the generated output (specified without a file extension).
Possible formats for printer output.
drasilMakefileReqOpts :: WriteOptions Source #
These are the default file-writing WriteOptions required for Drasil (the
main Makefile will not play well otherwise).
Options:
overwritePolicy: Always allow file-overwriting.dirName: The example's abbreviation.textEncoding: UTF-8.debugDataPolicy: Dependant onDEBUG_ENVenvironment variable being set, writing to a nested `.drasil` folder.
Arguments
| :: ToFiles sys concOpts | |
| => sys | The system. |
| -> concOpts | The concretization options. |
| -> WriteOptions | The file-writing options. |
| -> IO () | Files will be written to a local directory named after the abbreviation of the system. |
Concretize a system into a concrete set of files and write them to disk.
Note: Writes files to a subdirectory of the current working directory.
setSystemLocale :: IO () Source #
Deprecated: Use concretizeAndWrite instead of directly setting system locale before file-writing.
Internal: Set system locale encoding to UTF-8.
data WriteOptions Source #
Configuration options for writing a repository of software artifacts.
Constructors
| WO | |
Fields
| |
data DebugDataPolicy Source #
When should debugging data be written?
Constructors
| AlwaysWrite | Always. |
Fields
| |
| CheckEnvVar | Only write debugging data if the following environment variable ( |
Fields
| |
| NeverWrite | Never. |