Pretty-printing of AbstractCurry.
This library provides a pretty-printer for AbstractCurry modules.
Author: Yannik Potdevin (with changes by Michael Hanus)
Version: March 2016
| defaultOptions
                  :: OptionsThe default options to pretty print a module. | 
| setPageWith
                  :: Int -> Options -> OptionsSets the page width of the pretty printer options. | 
| setIndentWith
                  :: Int -> Options -> OptionsSets the indentation width of the pretty printer options. | 
| setImportQualification
                  :: Options -> OptionsSets the qualification method to be used to print identifiers to "import qualification" (which is the default). | 
| setNoQualification
                  :: Options -> OptionsSets the qualification method to be used to print identifiers to "unqualified". | 
| setFullQualification
                  :: Options -> OptionsSets the qualification method to be used to print identifiers to "fully qualified". | 
| setOnDemandQualification
                  :: [CurryProg] -> Options -> OptionsSets the qualification method to be used to print identifiers to "qualification on demand". | 
| setModName
                  :: String -> Options -> OptionsSets the name of the current module in the pretty printer options. | 
| setLayoutChoice
                  :: LayoutChoice -> Options -> OptionsSets the preferred layout in the pretty printer options. | 
| showCProg
                  :: CurryProg -> StringShows a pretty formatted version of an abstract Curry Program. | 
| prettyCurryProg
                  :: Options -> CurryProg -> StringPretty-print the document generated by ppCurryProg, using the page width
specified by given options. | 
| ppCurryProg
                  :: Options -> CurryProg -> DocPretty-print a CurryProg (the representation of a program, written in Curry, using AbstractCurry) according to given options. | 
| ppMName
                  :: String -> DocPretty-print a module name (just a string). | 
| ppExports
                  :: Options -> [CTypeDecl] -> [CFuncDecl] -> DocPretty-print exports, i.e. | 
| ppImports
                  :: Options -> [String] -> DocPretty-print imports (list of module names) by prepending the word "import" to the module name. | 
| ppCOpDecl
                  :: Options -> COpDecl -> DocPretty-print operator precedence declarations. | 
| ppCTypeDecl
                  :: Options -> CTypeDecl -> DocPretty-print type declarations, like `data ... | 
| ppCFuncDecl
                  :: Options -> CFuncDecl -> DocPretty-print a function declaration. | 
| ppCFuncDeclWithoutSig
                  :: Options -> CFuncDecl -> DocPretty-print a function declaration without signature. | 
| ppCFuncSignature
                  :: Options -> (String,String) -> CTypeExpr -> DocPretty-print a function signature according to given options. | 
| ppCTypeExpr
                  :: Options -> CTypeExpr -> DocPretty-print a type expression. | 
| ppCRules
                  :: Options -> (String,String) -> [CRule] -> DocPretty-print a list of function rules, concatenated vertically. | 
| ppCRule
                  :: Options -> (String,String) -> CRule -> DocPretty-print a rule of a function. | 
| ppCPattern
                  :: Options -> CPattern -> DocPretty-print a pattern expression. | 
| ppCLiteral
                  :: Options -> CLiteral -> DocPretty-print given literal (Int, Float, ...). | 
| ppCRhs
                  :: Doc -> Options -> CRhs -> DocPretty-print the right hand side of a rule (or case expression), including the d sign, where dis the relation (as doc) between the left hand side
and the right hand side -- usually this is one of=,->. | 
| ppCExpr
                  :: Options -> CExpr -> DocPretty-print an expression. | 
| ppCStatement
                  :: Options -> CStatement -> Doc | 
| ppQFunc
                  :: Options -> (String,String) -> DocPretty-print a function name or constructor name qualified according to given options. | 
| ppFunc
                  :: (String,String) -> DocPretty-print a function name or constructor name non-qualified. | 
| ppQType
                  :: Options -> (String,String) -> DocPretty-print a type ( QName) qualified according to given options. | 
| ppType
                  :: (String,String) -> DocPretty-print a type ( QName) non-qualified. | 
Constructors:
The choice for a generally preferred layout.
Constructors:
PreferNestedLayout
                    :: LayoutChoice
                : prefer a layout where the arguments of
                           long expressions are vertically aligned
              PreferFilledLayout
                    :: LayoutChoice
                : prefer a layout where the arguments of
                           long expressions are filled as long as possible
                           into one line
              Constructors:
| The default options to pretty print a module. These are: 
 
                      These options can be changed by corresponding setters
( 
                      Note: If these default options are used for pretty-print operations
other than  
 | 
| 
                       Sets the page width of the pretty printer options. 
 | 
| 
                       Sets the indentation width of the pretty printer options. 
 | 
| 
                       Sets the qualification method to be used to print identifiers to "import qualification" (which is the default). In this case, all identifiers imported from other modules (except for the identifiers of the prelude) are fully qualified. 
 | 
| 
                       Sets the qualification method to be used to print identifiers to "unqualified". In this case, no identifiers is printed with its module qualifier. This might lead to name conflicts or unintended references if some identifiers in the pretty-printed module are in conflict with imported identifiers. 
 | 
| 
                       Sets the qualification method to be used to print identifiers to "fully qualified". In this case, every identifiers, including those of the processed module and the prelude, are fully qualified. 
 | 
| 
                       Sets the qualification method to be used to print identifiers to "qualification on demand". In this case, an identifier is qualified only if it is necessary to avoid a name conflict, e.g., if a local identifier has the same names as an imported identifier. Since it is necessary to know the names of all identifiers defined in the current module (to be pretty printed) and imported from other modules, the first argument is the list of modules consisting of the current module and all imported modules (including the prelude). The current module must always be the head of this list. | 
| 
                       Sets the name of the current module in the pretty printer options. 
 | 
| 
                       Sets the preferred layout in the pretty printer options. 
 | 
| 
                       
                      Shows a pretty formatted version of an abstract Curry Program.
The options for pretty-printing are the  
 
 
 | 
| 
                       
                      Pretty-print the document generated by  | 
| 
                       
                      Pretty-print a CurryProg (the representation of a program, written in Curry,
using AbstractCurry) according to given options.
This function will overwrite the module name given by options
with the name specified as the first component of  | 
| Pretty-print a module name (just a string). 
 | 
| 
                       Pretty-print exports, i.e. all type and function declarations which are public. extract the type and function declarations which are public and gather their qualified names in a list. | 
| 
                       
                      Pretty-print imports (list of module names) by prepending the word "import"
to the module name. If the qualification mode is  | 
| 
                       
                      Pretty-print type declarations, like  | 
| 
                       Pretty-print a function declaration. | 
| 
                       Pretty-print a function declaration without signature. | 
| 
                       Pretty-print a function signature according to given options. | 
| 
                       Pretty-print a type expression. | 
| 
                       Pretty-print a list of function rules, concatenated vertically. | 
| 
                       
                      Pretty-print a rule of a function. Given a function
 | 
| 
                       Pretty-print a pattern expression. | 
| 
                       Pretty-print given literal (Int, Float, ...). | 
| 
                       
                      Pretty-print the right hand side of a rule (or case expression), including
the d sign, where  | 
| 
                       | 
| 
                       
                      Pretty-print a function name or constructor name qualified according to
given options. Use  | 
| 
                       
                      Pretty-print a function name or constructor name non-qualified.
Use  |