Safe Haskell | None |
---|
- class Render dom where
- renderSym :: dom sig -> String
- renderArgs :: [String] -> dom sig -> String
- render :: forall dom a. Render dom => ASTF dom a -> String
- class Render dom => StringTree dom where
- stringTreeSym :: [Tree String] -> dom a -> Tree String
- stringTree :: forall dom a. StringTree dom => ASTF dom a -> Tree String
- showAST :: StringTree dom => ASTF dom a -> String
- drawAST :: StringTree dom => ASTF dom a -> IO ()
- writeHtmlAST :: StringTree sym => FilePath -> ASTF sym a -> IO ()
Documentation
Render a symbol as concrete syntax. A complete instance must define at least the renderSym
method.
renderSym :: dom sig -> StringSource
Show a symbol as a String
renderArgs :: [String] -> dom sig -> StringSource
Render a symbol given a list of rendered arguments
Render Semantics | |
Render Empty | |
Render Condition | |
Render Construct | |
Render Identity | |
Render Literal | |
Render Tuple | |
Render Select | |
Render Let | |
Render Lambda | |
Render Variable | |
Render Node | |
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) |
render :: forall dom a. Render dom => ASTF dom a -> StringSource
Render an expression as concrete syntax
class Render dom => StringTree dom whereSource
Convert a symbol to a Tree
of strings
stringTreeSym :: [Tree String] -> dom a -> Tree StringSource
Convert a symbol to a Tree
given a list of argument trees
StringTree Empty | |
StringTree Condition | |
StringTree Construct | |
StringTree Identity | |
StringTree Literal | |
StringTree Tuple | |
StringTree Select | |
StringTree Let | |
StringTree Lambda | |
StringTree Variable | |
StringTree Node | |
Monad m => StringTree (MONAD m) | |
(StringTree dom1, StringTree dom2) => StringTree (:+: dom1 dom2) | |
StringTree dom => StringTree (:|| dom pred) | |
StringTree dom => StringTree (:| dom pred) | |
StringTree expr => StringTree (Decor info expr) | |
StringTree dom => StringTree (SubConstr1 c dom p) | |
StringTree dom => StringTree (SubConstr2 c dom pa pb) |
stringTree :: forall dom a. StringTree dom => ASTF dom a -> Tree StringSource
Convert an expression to a Tree
of strings
showAST :: StringTree dom => ASTF dom a -> StringSource
Show a syntax tree using ASCII art
drawAST :: StringTree dom => ASTF dom a -> IO ()Source
Print a syntax tree using ASCII art
writeHtmlAST :: StringTree sym => FilePath -> ASTF sym a -> IO ()Source