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

Synopsis

Documentation

type GenState = State DrasilState Source #

Abbreviation used throughout generator.

type MatchedSpaces = Space -> GenState CodeType Source #

Type for the mapping between Spaces and CodeTypes.

type ModExportMap = Map String String Source #

Variable/function name maps to module name.

type ClassDefinitionMap = Map String String Source #

Variable/function name maps to class name.

data ScopeType Source #

Variable scope

Constructors

Local 
Global 
MainFn 

modExportMap :: OldCodeSpec -> Choices -> [Mod] -> ModExportMap Source #

Builds the module export map, mapping each function and state variable name in the generated code to the name of the generated module that exports it.

clsDefMap :: OldCodeSpec -> Choices -> [Mod] -> ClassDefinitionMap Source #

Builds the class definition map, mapping each generated method and state variable name to the name of the generated class where it is defined.

addToDesignLog :: Space -> CodeType -> Doc -> DrasilState -> DrasilState Source #

Adds a message to the design log if the given Space-CodeType match has not already been logged.

addLoggedSpace :: Space -> CodeType -> DrasilState -> DrasilState Source #

Adds a Space-CodeType pair to the loggedSpaces list in DrasilState to prevent a duplicate log from being generated for that Space-CodeType pair.

genICName :: InternalConcept -> GenState Name Source #

Get InternalConcept name using DrasilState