Safe Haskell | None |
---|
- class Render expr where
- render :: expr a -> String
- renderArgs :: [String] -> expr a -> String
- printExpr :: Render expr => expr a -> IO ()
- class Render expr => ToTree expr where
- toTreeArgs :: [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 renderArgs
.
render :: expr a -> StringSource
Render an expression as a String
renderArgs :: [String] -> expr a -> StringSource
Render a partially applied expression given a list of rendered missing arguments
Render Semantics | |
Render Empty | |
Render Condition | |
Render Construct | |
Render Identity | |
Render Literal | |
Render Select | |
Render Tuple | |
Render Let | |
Render Lambda | |
Render Variable | |
Render Node | |
Render dom => Render (AST dom) | |
Monad m => Render (MONAD m) | |
(Render expr1, Render expr2) => Render (:+: expr1 expr2) | |
Render dom => Render (:|| dom pred) | |
Render dom => Render (:| dom pred) | |
Render expr => Render (Decor info expr) | |
Render dom => Render (SubConstr1 c dom p) | |
Render dom => Render (SubConstr2 c dom pa pb) |
class Render expr => ToTree expr whereSource
toTreeArgs :: [Tree String] -> expr a -> Tree StringSource
Convert a partially applied expression to a syntax tree given a list of rendered missing arguments
ToTree Empty | |
ToTree Condition | |
ToTree Construct | |
ToTree Identity | |
ToTree Literal | |
ToTree Select | |
ToTree Tuple | |
ToTree Let | |
ToTree Lambda | |
ToTree Variable | |
ToTree Node | |
(Render (AST dom), ToTree dom) => ToTree (AST dom) | |
(Render (MONAD m), Monad m) => ToTree (MONAD m) | |
(Render (:+: expr1 expr2), ToTree expr1, ToTree expr2) => ToTree (:+: expr1 expr2) | |
(Render (:|| dom pred), ToTree dom) => ToTree (:|| dom pred) | |
(Render (:| dom pred), ToTree dom) => ToTree (:| dom pred) | |
(Render (Decor info expr), ToTree expr) => ToTree (Decor info expr) | |
(Render (SubConstr1 c dom p), ToTree dom) => ToTree (SubConstr1 c dom p) | |
(Render (SubConstr2 c dom pa pb), ToTree dom) => ToTree (SubConstr2 c dom pa pb) |