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

GOOL.Drasil.LanguageRenderer.LanguagePolymorphic

Description

Implementations defined here are valid for any language renderer.

Synopsis

Documentation

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

multiBody :: (RenderSym r, Monad r) => [MSBody r] -> MS (r Doc) Source #

block :: (RenderSym r, Monad r) => [MSStatement r] -> MS (r Doc) Source #

multiBlock :: (RenderSym r, Monad r) => [MSBlock r] -> MS (r Doc) Source #

classVarCheckStatic :: RenderSym 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

litChar :: RenderSym r => (Doc -> Doc) -> Char -> SValue r Source #

arg :: RenderSym r => SValue r -> SValue r -> SValue r Source #

call :: RenderSym 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 ClassInterface

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

func :: RenderSym r => Label -> VSType r -> [SValue r] -> VSFunction r Source #

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

listAdd :: RenderSym r => SValue r -> SValue r -> SValue r -> SValue r Source #

listSet :: RenderSym r => SValue r -> SValue r -> SValue r -> SValue r Source #

throw :: RenderSym r => (r (Value r) -> Doc) -> Terminator -> Label -> MSStatement r Source #

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

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

construct :: RenderSym r => Label -> MS (r (Type r)) Source #

param :: RenderSym r => (r (Variable r) -> Doc) -> SVariable r -> MSParameter r Source #

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

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

commentedClass :: (RenderSym 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 :: RenderSym r => String -> (r (Module r) -> r (Block r)) -> r (Block r) -> FSModule r -> SFile r Source #

newtype OptionalSpace Source #

Constructors

OSpace 

Fields