- 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
.
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
Render dom => Render (AST dom) | |
Render (Sym ctx) | |
Render (Literal ctx) | |
Render (Condition ctx) | |
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 (Ann info expr) | |
Render (Let ctxa ctxb) |
class Render expr => ToTree expr whereSource
toTreePart :: [Tree String] -> expr a -> Tree StringSource
Convert a partially applied constructor to a syntax tree given a list of rendered missing arguments
ToTree dom => ToTree (AST dom) | |
ToTree (Sym ctx) | |
ToTree (Literal ctx) | |
ToTree (Condition ctx) | |
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 (Ann info expr) | |
ToTree (Let ctxa ctxb) |