Module AbstractHaskell.Printer

A pretty printer for AbstractHaskell programs.

This library defines a function "ppProg" that shows an AbstractHaskell program in standard Haskell syntax.

Author: Björn Peemöller

Version: May 2017

Summary of exported operations:

defaultOptions :: Options  Deterministic 
pPrint :: Doc -> String  Deterministic 
ppProg :: Options -> Prog -> Doc  Deterministic 
Shows an AbstractHaskell program in standard Haskell syntax.
ppHeader :: Options -> String -> [TypeDecl] -> [FuncDecl] -> Doc  Deterministic 
ppDecls :: Options -> [OpDecl] -> [TypeDecl] -> [FuncDecl] -> Doc  Deterministic 
ppImports :: Options -> [String] -> Doc  Deterministic 

Exported datatypes:


Options

Constructors:

  • Options :: String -> (String -> Bool) -> Bool -> Bool -> Options

    Fields:

    • currentModule :: String
    • qualImpModule :: (String -> Bool)
    • traceFailure :: Bool
    • kics2Mode :: Bool

Exported operations:

defaultOptions :: Options  Deterministic 

Further infos:
  • solution complete, i.e., able to compute all solutions

pPrint :: Doc -> String  Deterministic 

ppProg :: Options -> Prog -> Doc  Deterministic 

Shows an AbstractHaskell program in standard Haskell syntax. The export list contains the public functions and the types with their data constructors (if all data constructors are public), otherwise only the type constructors. The potential comments in function declarations are formatted as documentation comments.

ppHeader :: Options -> String -> [TypeDecl] -> [FuncDecl] -> Doc  Deterministic 

ppDecls :: Options -> [OpDecl] -> [TypeDecl] -> [FuncDecl] -> Doc  Deterministic 

ppImports :: Options -> [String] -> Doc  Deterministic