sifflet-lib-1.0: Library of modules shared by sifflet and its tests and its exporters.Source codeContentsIndex
Sifflet.Foreign.ToPython
Description
Sifflet to abstract syntax tree for Python. Use Python module's pretty to pretty-print the result.
Synopsis
data PythonOptions = PythonOptions
defaultPythonOptions :: PythonOptions
exprToPExpr :: Expr -> PExpr
valueToPExpr :: Value -> PExpr
nameToPython :: String -> Either POperator String
fixIdentifierChars :: String -> String
functionToPyDef :: Function -> PStatement
defToPy :: FunctionDefTuple -> PStatement
functionsToPyModule :: Functions -> PModule
functionsToPrettyPy :: Functions -> String
exportPython :: PythonOptions -> Exporter
Documentation
data PythonOptions Source
Options for Python export. Should probably include choices like Python2 or Python3; if statement or if expression. Right now, just a placeholder.
Constructors
PythonOptions
show/hide Instances
defaultPythonOptions :: PythonOptionsSource
exprToPExpr :: Expr -> PExprSource
valueToPExpr :: Value -> PExprSource
nameToPython :: String -> Either POperator StringSource
Convert Sifflet name (of a function) to Python name
fixIdentifierChars :: String -> StringSource
Remove characters that are not valid in a Python identifier, and in some cases, insert other characters to show what's missing
functionToPyDef :: Function -> PStatementSource
defToPy :: FunctionDefTuple -> PStatementSource
functionsToPyModule :: Functions -> PModuleSource
functionsToPrettyPy :: Functions -> StringSource
exportPython :: PythonOptions -> ExporterSource
Produced by Haddock version 2.6.1