little-earley-0.1.0.0: Simple implementation of Earley parsing
Safe HaskellSafe-Inferred
LanguageHaskell2010

Little.Earley.Internal.Pretty

Synopsis

Documentation

class PrettyPrint a where Source #

A class for ad hoc pretty-printers.

Minimal complete definition

Nothing

Methods

prettyPrint :: a -> String Source #

default prettyPrint :: Show a => a -> String Source #

Instances

Instances details
PrettyPrint Char Source #

Display the character without quotes.

Instance details

Defined in Little.Earley.Internal.Pretty

Show a => PrettyPrint a Source # 
Instance details

Defined in Little.Earley.Internal.PrettyOrphan

Methods

prettyPrint :: a -> String Source #

PrettyPrint String Source #

Display the string without quotes.

Instance details

Defined in Little.Earley.Internal.Pretty

(PrettyPrint n, PrettyPrint c) => PrettyPrint (Result n t c) Source # 
Instance details

Defined in Little.Earley.Internal.Result

Methods

prettyPrint :: Result n t c -> String Source #

newtype Pretty a Source #

Wrapper whose Show instance uses PrettyPrint.

This provides a convenient and explicit way to display results nicely in the REPL. See also pparse.

Constructors

Pretty a 

Instances

Instances details
PrettyPrint a => Show (Pretty a) Source # 
Instance details

Defined in Little.Earley.Internal.Pretty

Methods

showsPrec :: Int -> Pretty a -> ShowS #

show :: Pretty a -> String #

showList :: [Pretty a] -> ShowS #