| Safe Haskell | None |
|---|
Language.Syntactic.Interpretation.Render
- class Render expr where
- render :: expr a -> String
- renderPart :: [String] -> expr a -> String
- printExpr :: Render expr => expr a -> IO ()
- class Render expr => ToTree expr where
- toTreePart :: [Tree String] -> expr a -> Tree String
- showAST :: ToTree dom => AST dom a -> String
- drawAST :: ToTree dom => AST dom a -> IO ()
Documentation
Render an expression as concrete syntax. A complete instance must define
either of the methods render and renderPart.
Methods
render :: expr a -> StringSource
Render an expression as a String
renderPart :: [String] -> expr a -> StringSource
Render a partially applied constructor given a list of rendered missing arguments
Instances
| Render Semantics | |
| Render dom => Render (AST dom) | |
| Render (Condition ctx) | |
| Render (Construct ctx) | |
| Render (Identity ctx) | |
| Render (Literal ctx) | |
| Monad m => Render (MONAD m) | |
| Render (Select ctx) | |
| Render (Tuple ctx) | |
| Render (Lambda ctx) | |
| Render (Variable ctx) | |
| Render (Node ctx) | |
| (Render expr1, Render expr2) => Render (:+: expr1 expr2) | |
| Render expr => Render (Decor info expr) | |
| Render (Let ctxa ctxb) |
class Render expr => ToTree expr whereSource
Methods
toTreePart :: [Tree String] -> expr a -> Tree StringSource
Convert a partially applied constructor to a syntax tree given a list of rendered missing arguments
Instances
| ToTree dom => ToTree (AST dom) | |
| ToTree (Condition ctx) | |
| ToTree (Construct ctx) | |
| ToTree (Identity ctx) | |
| ToTree (Literal ctx) | |
| Monad m => ToTree (MONAD m) | |
| ToTree (Select ctx) | |
| ToTree (Tuple ctx) | |
| ToTree (Lambda ctx) | |
| ToTree (Variable ctx) | |
| ToTree (Node ctx) | |
| (ToTree expr1, ToTree expr2) => ToTree (:+: expr1 expr2) | |
| ToTree expr => ToTree (Decor info expr) | |
| ToTree (Let ctxa ctxb) |