drasil-code-0.1.9.0: A framework for code and document generation for scientific software - Code SubPackage
Safe HaskellSafe-Inferred
LanguageHaskell2010

Language.Drasil.Code.Imperative.Generator

Description

Defines generation functions for SCS code packages.

Synopsis

Documentation

data SomeProgGenerator where Source #

Constructors

SomeProgGenerator :: forall repr. OOProg repr => (repr (Program repr) -> ProgData) -> SomeProgGenerator 

generator :: Lang -> String -> [Expr] -> Choices -> CodeSpec -> DrasilState Source #

Initializes the generator's DrasilState. Space parameter is a string representing the date. \['Expr'\] parameter is the sample input values provided by the user.

generateCode :: (SoftwareDossierSym packRepr, Monad packRepr) => Lang -> SomeProgGenerator -> (packRepr PackageData -> PackageData) -> DrasilState -> FileLayout Source #

Generates a package with the given DrasilState. The passed un-representation functions determine which target language the package will be generated in.

generateCodeProc :: (ProcProg progRepr, SoftwareDossierSym packRepr, Monad packRepr) => Lang -> (progRepr (Program progRepr) -> ProgData) -> (packRepr PackageData -> PackageData) -> DrasilState -> FileLayout Source #

Generates a package with the given DrasilState. The passed un-representation functions determine which target language the package will be generated in.

toFileLayout :: [FileData] -> [FileLayout] Source #

Internal: Converts a list of FileData to a FileLayout.