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) prg file mod cls stvr mthd attch vis param bod block stmt var scope val binder typ. OOProg repr prg file mod cls stvr mthd attch vis param bod block stmt var scope val binder typ => (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 val typ, ProcProg progRepr prg file mod mthd vis param bod block stmt var scope val binder typ, 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.