This module contains a pretty printer for ICurry programs.
Pretty print an ICurry module
:: IProg
|
the module |
-> Doc
|
the pretty printed module |
Pretty print an ICurry module header
:: String
|
the module name |
-> Doc
|
the pretty printed module header |
Pretty print an ICurry module import list
:: [String]
|
the imported modules' names |
-> Doc
|
the pretty printed import list |
Pretty print an import directive
:: String
|
the imported module's name |
-> Doc
|
the pretty printed module import directive |
ppDataTypes
:: [IDataType] -> Doc
Pretty print ICurry types
:: [IDataType]
|
the data type declarations |
-> Doc
|
the pretty printed types |
ppDataType
:: IDataType -> Doc
Pretty print an ICurry type
:: IDataType
|
the data type declaration |
-> Doc
|
the pretty printed type |
ppConstructors
:: [((String, String, Int), Int)] -> Doc
Pretty print ICurry constructors
:: [(IQName, IArity)]
|
the data constructors |
-> Doc
|
the pretty printed constructors |
ppConstructor
:: ((String, String, Int), Int) -> Doc
Pretty print an ICurry constructor
:: (IQName, IArity)
|
the data constructor |
-> Doc
|
the pretty printed constructor |
ppFunctions
:: [IFunction] -> Doc
Pretty print ICurry functions
:: [IFunction]
|
the functions |
-> Doc
|
the pretty printed functions |
ppFunction
:: IFunction -> Doc
Pretty print an ICurry function
:: IFunction
|
the function |
-> Doc
|
the pretty printed function |
ppQName
:: (String, String, Int) -> Doc
Pretty print a qualified ICurry name (module.localname)
:: IQName
|
the name |
-> Doc
|
the pretty printed name |
ppFuncBody
:: IFuncBody -> Doc
Pretty print an ICurry function's body
:: IFuncBody
|
the function's body |
-> Doc
|
the pretty printed function body |
Pretty print a list of variables
:: [IVarIndex]
|
the variables |
-> Doc
|
the pretty printed variables |
Pretty print a variable. Variables are called x0, x1, ...
Since variable with index 0 is always used for the root,
we print it as ROOT.
:: IVarIndex
|
the variable |
-> Doc
|
the pretty printed variable |
Pretty print an ICurry block
:: IBlock
|
the block |
-> Doc
|
the rendered block |
ppStatement
:: IStatement -> Doc
Pretty print an ICurry block
:: IStatement
|
the block |
-> Doc
|
the rendered block |
ppVarDecls
:: [IVarDecl] -> Doc
Pretty print local variable declarations
:: [IVarDecl]
|
the local variables |
-> Doc
|
the pretty printed variable declarations |
Pretty print a local variable declaration.
ppAssignments
:: [IAssign] -> Doc
Pretty print assignments
:: [IAssign]
|
the assignments |
-> Doc
|
the pretty printed assignments |
ppAssignment
:: IAssign -> Doc
Pretty print an assignment
:: IAssign
|
the assignment |
-> Doc
|
the pretty printed assignment |
Pretty print comma separated expressions
:: [IExpr]
|
the expressions |
-> Doc
|
the pretty printed expressions |
Pretty print an ICurry expression
:: IExpr
|
the expression |
-> Doc
|
the pretty printed expression |
ppConsBranches
:: [IConsBranch] -> Doc
Pretty print branches over constructors
:: [IConsBranch]
|
the branches |
-> Doc
|
the pretty printed branches |
ppConsBranch
:: IConsBranch -> Doc
Pretty print a branch over constructors
:: IConsBranch
|
the branch |
-> Doc
|
the pretty printed branch |
ppLitBranches
:: [ILitBranch] -> Doc
Pretty print branches over literals
:: [ILitBranch]
|
the branches |
-> Doc
|
the pretty printed branches |
ppLitBranch
:: ILitBranch -> Doc
Pretty print a branch over literals
:: ILitBranch
|
the branch |
-> Doc
|
the pretty printed branch |
Pretty print an ICurry position
Pretty print an ICurry literal
:: ILiteral
|
the literal |
-> Doc
|
the pretty printed literal |