drasil-code-0.1.9.0: A framework for code and document generation for scientific software - Code SubPackage
Safe HaskellNone
LanguageGHC2024

Language.Drasil.Code.Imperative.Generator

Description

Defines generation functions for SCS code packages.

Synopsis

Documentation

data SomeProgGenerator where Source #

Constructors

SomeProgGenerator :: forall (repr :: Type -> Type) vis stmt mthd stvr attch prg file mod bod block. OOProg repr vis stmt mthd stvr attch prg file mod bod block => (repr prg -> ProgData) -> SomeProgGenerator 

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

Initializes the generator's DrasilState. String 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 :: (NativeVector progRepr, ProcProg progRepr vis stmt mthd prg file mod bod block, SoftwareDossierSym packRepr, Monad packRepr) => Lang -> (progRepr prg -> 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.