This module contains a pretty printer for ICurry programs.
Author: Marc Andre Wittorf and Michael Hanus
Version: November 2020
ppIProg
:: IProg -> Doc
Pretty print an ICurry module |
ppHeader
:: String -> Doc
Pretty print an ICurry module header |
ppImports
:: [String] -> Doc
Pretty print an ICurry module import list |
ppImport
:: String -> Doc
Pretty print an import directive |
ppDataTypes
:: [IDataType] -> Doc
Pretty print ICurry types |
ppDataType
:: IDataType -> Doc
Pretty print an ICurry type |
ppConstructors
:: [((String,String,Int),Int)] -> Doc
Pretty print ICurry constructors |
ppConstructor
:: ((String,String,Int),Int) -> Doc
Pretty print an ICurry constructor |
ppFunctions
:: [IFunction] -> Doc
Pretty print ICurry functions |
ppFunction
:: IFunction -> Doc
Pretty print an ICurry function |
ppQName
:: (String,String,Int) -> Doc
Pretty print a qualified ICurry name (module.localname) |
ppFuncBody
:: IFuncBody -> Doc
Pretty print an ICurry function's body |
ppVars
:: [Int] -> Doc
Pretty print a list of variables |
ppVar
:: Int -> Doc
Pretty print a variable. |
ppBlock
:: IBlock -> Doc
Pretty print an ICurry block |
ppStatement
:: IStatement -> Doc
Pretty print an ICurry block |
ppVarDecls
:: [IVarDecl] -> Doc
Pretty print local variable declarations |
ppVarDecl
:: IVarDecl -> Doc
Pretty print a local variable declaration. |
ppAssignments
:: [IAssign] -> Doc
Pretty print assignments |
ppAssignment
:: IAssign -> Doc
Pretty print an assignment |
ppExprs
:: [IExpr] -> Doc
Pretty print comma separated expressions |
ppExpr
:: IExpr -> Doc
Pretty print an ICurry expression |
ppConsBranches
:: [IConsBranch] -> Doc
Pretty print branches over constructors |
ppConsBranch
:: IConsBranch -> Doc
Pretty print a branch over constructors |
ppLitBranches
:: [ILitBranch] -> Doc
Pretty print branches over literals |
ppLitBranch
:: ILitBranch -> Doc
Pretty print a branch over literals |
ppPos
:: [Int] -> Doc
Pretty print an ICurry position |
ppLit
:: ILiteral -> Doc
Pretty print an ICurry literal |
Pretty print an ICurry module
|
Pretty print an ICurry module header
|
Pretty print an ICurry module import list
|
Pretty print an import directive
|
Pretty print ICurry types
|
Pretty print an ICurry type
|
Pretty print ICurry constructors
|
Pretty print an ICurry constructor
|
Pretty print ICurry functions
|
Pretty print an ICurry function
|
Pretty print a qualified ICurry name (module.localname)
|
Pretty print an ICurry function's body
|
Pretty print a list of 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
|
Pretty print an ICurry block
|
Pretty print an ICurry block
|
Pretty print local variable declarations
|
Pretty print assignments
|
Pretty print an assignment
|
Pretty print comma separated expressions
|
Pretty print an ICurry expression
|
Pretty print branches over constructors
|
Pretty print a branch over constructors
|
Pretty print branches over literals
|
Pretty print a branch over literals
|