Stability | experimental |
---|---|
Safe Haskell | None |
Language | Haskell2010 |
Language.Egison.Pretty.Pattern
Contents
Description
A pretty printer for Egison patterns.
Synopsis
- prettyExpr :: (MonadError (Error n) m, Ord n) => PrintMode n v e -> Expr n v e -> m Text
- newtype Error n = UnknownInfixOperator n
- data Associativity
- newtype Precedence = Precedence Int
- data Fixity n = Fixity {
- associativity :: Associativity
- precedence :: Precedence
- symbol :: n
- data PrintMode n v e = PrintMode {
- fixities :: [PrintFixity n]
- varNamePrinter :: ExtPrinter v
- namePrinter :: ExtPrinter n
- valueExprPrinter :: ExtPrinter e
- pageMode :: Maybe PageMode
- data PageMode = PageMode {}
- data PrintFixity n = PrintFixity {}
- type ExtPrinter a = a -> Text
Documentation
prettyExpr :: (MonadError (Error n) m, Ord n) => PrintMode n v e -> Expr n v e -> m Text Source #
Pretty print Expr
.
Re-exports
A pretty printer error.
Constructors
UnknownInfixOperator n |
data Associativity Source #
Associativity of infix operators.
Constructors
AssocLeft | |
AssocRight | |
AssocNone |
Instances
newtype Precedence Source #
A precedence of infix operators.
Constructors
Precedence Int |
Instances
Fixity of infix operators.
Constructors
Fixity | |
Fields
|
Printer configuration.
Constructors
PrintMode | |
Fields
|
Rendering style configuration.
Constructors
PageMode | |
Fields
|
type ExtPrinter a = a -> Text Source #
is a type for externally provided printer of ExtPrinter
aa
.