| Safe Haskell | None |
|---|---|
| Language | Haskell2010 |
Language.Syntactic.Interpretation.Render
- 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.
Minimal complete definition
Methods
renderSym :: dom sig -> String Source
Show a symbol as a String
renderArgs :: [String] -> dom sig -> String Source
Render a symbol given a list of rendered arguments
Instances
| Render Semantics Source | |
| Render Empty Source | |
| Render Condition Source | |
| Render Construct Source | |
| Render Identity Source | |
| Render Literal Source | |
| Render Tuple Source | |
| Render Select Source | |
| Render Let Source | |
| Render Lambda Source | |
| Render Variable Source | |
| Render Node Source | |
| Monad m => Render (MONAD m) Source | |
| (Render expr1, Render expr2) => Render ((:+:) expr1 expr2) Source | |
| Render dom => Render ((:||) dom pred) Source | |
| Render dom => Render ((:|) dom pred) Source | |
| Render expr => Render (Decor info expr) Source | |
| Render dom => Render (SubConstr1 c dom p) Source | |
| Render dom => Render (SubConstr2 c dom pa pb) Source |
render :: forall dom a. Render dom => ASTF dom a -> String Source
Render an expression as concrete syntax
class Render dom => StringTree dom where Source
Convert a symbol to a Tree of strings
Minimal complete definition
Nothing
Methods
stringTreeSym :: [Tree String] -> dom a -> Tree String Source
Convert a symbol to a Tree given a list of argument trees
Instances
| StringTree Empty Source | |
| StringTree Condition Source | |
| StringTree Construct Source | |
| StringTree Identity Source | |
| StringTree Literal Source | |
| StringTree Tuple Source | |
| StringTree Select Source | |
| StringTree Let Source | |
| StringTree Lambda Source | |
| StringTree Variable Source | |
| StringTree Node Source | |
| Monad m => StringTree (MONAD m) Source | |
| (StringTree dom1, StringTree dom2) => StringTree ((:+:) dom1 dom2) Source | |
| StringTree dom => StringTree ((:||) dom pred) Source | |
| StringTree dom => StringTree ((:|) dom pred) Source | |
| StringTree expr => StringTree (Decor info expr) Source | |
| StringTree dom => StringTree (SubConstr1 c dom p) Source | |
| StringTree dom => StringTree (SubConstr2 c dom pa pb) Source |
stringTree :: forall dom a. StringTree dom => ASTF dom a -> Tree String Source
Convert an expression to a Tree of strings
showAST :: StringTree dom => ASTF dom a -> String Source
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