prettyprinter-configurable-1.1.0.0
Safe Haskell None
Language Haskell2010

Text.PrettyBy.Monad

Description

A monadic interface to configurable pretty-printing.

Synopsis

Documentation

class HasPrettyConfig env config | env -> config where Source #

A constraint for " config is a part of env ".

Instances

Instances details
HasPrettyConfig ( Sole config) config Source #

It's not possible to have HasPrettyConfig config config , because that would mean that every environment is a pretty-printing config on its own, which doesn't make sense. We could have an OVERLAPPABLE instance, but I'd rather not.

Instance details

Defined in Text.PrettyBy.Fixity

type MonadPretty config env m = ( MonadReader env m, HasPrettyConfig env config) Source #

A constraint for " m is a monad that allows to pretty-print values in it by a config ".

prettyM :: ( MonadPretty config env m, PrettyBy config a) => a -> m ( Doc ann) Source #

Pretty-print a value in a configurable way in a monad holding a config.

displayM :: forall str a m env config. ( MonadPretty config env m, PrettyBy config a, Render str) => a -> m str Source #

Pretty-print and render a value as a string type in a configurable way in a monad holding a config.