drasil-gen-0.1.3.0: A framework for code and document generation for scientific software - Utils SubPackage
Safe HaskellSafe-Inferred
LanguageHaskell2010

Drasil.Generator

Synopsis

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.

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).

data Format Source #

Possible formats for printer output.

Constructors

TeX 
HTML 
Jupyter 
MDBook 

Instances

Instances details
Show Format Source # 
Instance details

Defined in Drasil.Generator.Formats

drasilMakefileReqOpts :: WriteOptions Source #

These are the default file-writing WriteOptions required for Drasil (the main Makefile will not play well otherwise).

Options:

  1. overwritePolicy: Always allow file-overwriting.
  2. dirName: The example's abbreviation.
  3. textEncoding: UTF-8.
  4. debugDataPolicy: Dependant on DEBUG_ENV environment variable being set, writing to a nested `.drasil` folder.

concretizeAndWrite Source #

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

  • PathSegment

    The name of the directory to carry all debugging data files.

CheckEnvVar

Only write debugging data if the following environment variable (String) is non-empty.

Fields

  • String

    The environment variable name.

  • PathSegment

    The name of the directory to carry all debugging data files.

NeverWrite

Never.