compdata-0.11: Compositional Data Types

Safe HaskellNone
LanguageHaskell98

Data.Comp.Render

Synopsis

Documentation

class (Functor f, Foldable f, ShowConstr f) => Render f where Source #

The stringTree algebra of a functor. The default instance creates a tree with the same structure as the term.

Instances

(Render f, Render g) => Render ((:+:) * f g) Source # 

Methods

stringTreeAlg :: Alg ((* :+: f) g) (Tree String) Source #

stringTree :: Render f => Term f -> Tree String Source #

Convert a term to a Tree

showTerm :: Render f => Term f -> String Source #

Show a term using ASCII art

drawTerm :: Render f => Term f -> IO () Source #

Print a term using ASCII art

writeHtmlTerm :: Render f => FilePath -> Term f -> IO () Source #

Write a term to an HTML file with foldable nodes