syntactic-1.15.1: Generic abstract syntax, and utilities for embedded languages

Safe HaskellNone
LanguageHaskell2010

Language.Syntactic.Interpretation.Render

Synopsis

Documentation

class Render dom where Source

Render a symbol as concrete syntax. A complete instance must define at least the renderSym method.

Minimal complete definition

renderSym

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

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

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