drasil-gool-0.1.1.0: A framework for code and document generation for scientific software - GOOL SubPackage
Safe HaskellSafe-Inferred
LanguageHaskell2010

Drasil.GOOL.LanguageRenderer.LanguagePolymorphic

Description

Implementations defined here are valid for any language renderer.

Synopsis

Documentation

fileFromData :: OORenderSym r => (FilePath -> r (Module r) -> r (File r)) -> FilePath -> FSModule r -> SFile r Source #

classVarCheckStatic :: CommonRenderSym r => r (Variable r) -> r (Variable r) Source #

To be used in classVar implementations. Throws an error if the variable is not static since classVar is for accessing static variables from a class

call :: CommonRenderSym r => Doc -> Maybe Library -> Maybe Doc -> MixedCall r Source #

First parameter is separator between name and value for named arguments, rest similar to call from RendererClasses

lambda :: CommonRenderSym r => ([r (Variable r)] -> r (Value r) -> Doc) -> [SVariable r] -> SValue r -> SValue r Source #

set :: OORenderSym r => SValue r -> SVariable r -> SValue r -> SValue r Source #

ifCond :: CommonRenderSym r => (Doc -> Doc) -> Doc -> OptionalSpace -> Doc -> Doc -> Doc -> [(SValue r, MSBody r)] -> MSBody r -> MSStatement r Source #

tryCatch :: CommonRenderSym r => (r (Body r) -> r (Body r) -> Doc) -> MSBody r -> MSBody r -> MSStatement r Source #

method :: OORenderSym r => Label -> r (Visibility r) -> r (Permanence r) -> VSType r -> [MSParameter r] -> MSBody r -> SMethod r Source #

function :: OORenderSym r => Label -> r (Visibility r) -> VSType r -> [MSParameter r] -> MSBody r -> SMethod r Source #

commentedClass :: (OORenderSym r, Monad r) => CS (r (BlockComment r)) -> SClass r -> CS (r Doc) Source #

modFromData :: Label -> (Doc -> r (Module r)) -> FS Doc -> FSModule r Source #

fileDoc :: OORenderSym r => String -> (r (Module r) -> r (Block r)) -> r (Block r) -> FSModule r -> SFile r Source #

docMod :: OORenderSym r => ModuleDocRenderer -> String -> String -> [String] -> String -> SFile r -> SFile r Source #

Generates a file for a documented module. mdr is a function that takes description, author, and module name and returns a doc comment e is the file extension d is the description (I think) a is a list of authors dt is the date fl is the file

newtype OptionalSpace Source #

Constructors

OSpace 

Fields