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   
pPrint :: Doc -> String   
ppProg :: Options -> Prog -> Doc   
Shows an AbstractHaskell program in standard Haskell syntax.
ppHeader :: Options -> String -> [TypeDecl] -> [FuncDecl] -> Doc   
ppDecls :: Options -> [OpDecl] -> [TypeDecl] -> [FuncDecl] -> Doc   
ppImports :: Options -> [String] -> Doc   

Exported datatypes:


Options

Constructors:

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

    Fields:

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

Exported operations:

defaultOptions :: Options   

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

pPrint :: Doc -> String   

ppProg :: Options -> Prog -> Doc   

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   

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

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