context-free-grammar-0.1.1: Basic algorithms on context-free grammars
Safe HaskellSafe-Inferred
LanguageHaskell2010

Data.Cfg.CPretty

Description

Pretty-printing that requires a context

Synopsis

Documentation

class CPretty p ctxt where Source #

Pretty-printing that requires a context

Methods

cpretty Source #

Arguments

:: MonadReader ctxt m 
=> p 
-> m Doc

pretty-print in a monad providing the context

Instances

Instances details
Cfg cfg t nt => CPretty (cfg t nt) (V t nt -> Doc) Source # 
Instance details

Defined in Data.Cfg.Cfg

Methods

cpretty :: MonadReader (V t nt -> Doc) m => cfg t nt -> m Doc Source #