Safe Haskell | Safe-Inferred |
---|---|
Language | Haskell2010 |
Synopsis
- modules :: [Definition] -> HashMap Module (Doc ann)
- module_ :: Module -> [Definition] -> Doc ann
- data Environment v = Environment {
- locals :: v -> Local
- freshLocals :: [Local]
- currentModule :: Module
- emptyEnvironment :: Module -> Environment Void
- extend :: Environment v -> (Environment (Var () v), Local)
- local :: Local -> Doc ann
- field :: Field -> Doc ann
- constructor :: Constructor -> Doc ann
- moduleName :: Module -> Doc ann
- qualified :: Environment v -> Qualified -> Doc ann
- definition :: Environment Void -> Definition -> Doc ann
- expression :: Environment v -> Int -> Expression v -> Doc ann
- pattern :: Environment (Var Int v) -> Int -> Pattern Int -> Doc ann
- type_ :: Environment v -> Int -> Type v -> Doc ann
Modules
modules :: [Definition] -> HashMap Module (Doc ann) Source #
Group the given definitions by their defining module, and generate an Elm module for each group.
module_ :: Module -> [Definition] -> Doc ann Source #
Generate an Elm module containing the given definitions.
Environments
data Environment v Source #
A pretty-printing environment with local variables in v
.
Environment | |
|
emptyEnvironment :: Module -> Environment Void Source #
extend :: Environment v -> (Environment (Var () v), Local) Source #
Pretty-printing names
constructor :: Constructor -> Doc ann Source #
moduleName :: Module -> Doc ann Source #
Pretty-printing definitions
definition :: Environment Void -> Definition -> Doc ann Source #
Pretty-printing expressions
expression :: Environment v -> Int -> Expression v -> Doc ann Source #