kleene-0.1: Kleene algebra

Safe HaskellSafe
LanguageHaskell2010

Kleene.Internal.Pretty

Synopsis

Documentation

class Pretty a where Source #

Pretty class.

For pretty :: RE -> String gives a representation accepted by many regex engines.

Minimal complete definition

pretty | prettyS

Methods

pretty :: a -> String Source #

prettyS :: a -> ShowS Source #

Instances
Pretty Bool Source # 
Instance details

Defined in Kleene.Internal.Pretty

Pretty Char Source #

Escapes special regexp characters

Instance details

Defined in Kleene.Internal.Pretty

Pretty () Source # 
Instance details

Defined in Kleene.Internal.Pretty

Methods

pretty :: () -> String Source #

prettyS :: () -> ShowS Source #

Show a => Pretty [a] Source # 
Instance details

Defined in Kleene.Internal.Pretty

Methods

pretty :: [a] -> String Source #

prettyS :: [a] -> ShowS Source #

Pretty a => Pretty (Maybe a) Source # 
Instance details

Defined in Kleene.Internal.Pretty

c ~ Char => Pretty (RSet c) Source # 
Instance details

Defined in Kleene.Internal.Pretty

Methods

pretty :: RSet c -> String Source #

prettyS :: RSet c -> ShowS Source #

c ~ Char => Pretty (RE c) Source # 
Instance details

Defined in Kleene.Internal.RE

Methods

pretty :: RE c -> String Source #

prettyS :: RE c -> ShowS Source #

c ~ Char => Pretty (ERE c) Source # 
Instance details

Defined in Kleene.ERE

Methods

pretty :: ERE c -> String Source #

prettyS :: ERE c -> ShowS Source #

Show c => Pretty (DFA c) Source # 
Instance details

Defined in Kleene.DFA

Methods

pretty :: DFA c -> String Source #

prettyS :: DFA c -> ShowS Source #

(Pretty c, Eq c) => Pretty (M c) Source # 
Instance details

Defined in Kleene.Monad

Methods

pretty :: M c -> String Source #

prettyS :: M c -> ShowS Source #

(Pretty a, Pretty b) => Pretty (Either a b) Source # 
Instance details

Defined in Kleene.Internal.Pretty

Methods

pretty :: Either a b -> String Source #

prettyS :: Either a b -> ShowS Source #

(Pretty a, Pretty b) => Pretty (a, b) Source # 
Instance details

Defined in Kleene.Internal.Pretty

Methods

pretty :: (a, b) -> String Source #

prettyS :: (a, b) -> ShowS Source #

Pretty (r c) => Pretty (Equiv r c) Source # 
Instance details

Defined in Kleene.Equiv

Methods

pretty :: Equiv r c -> String Source #

prettyS :: Equiv r c -> ShowS Source #

c ~ Char => Pretty (K c a) Source #

Convert to non-matching JavaScript string which can be used as an argument to new RegExp

>>> putPretty ("foobar" :: K Char String)
^foobar$
>>> putPretty $ many ("foobar" :: K Char String)
^(foobar)*$
Instance details

Defined in Kleene.Internal.Functor

Methods

pretty :: K c a -> String Source #

prettyS :: K c a -> ShowS Source #

c ~ Char => Pretty (K1 c a) Source #

Convert to non-matching JavaScript string which can be used as an argument to new RegExp

>>> putPretty ("foobar" :: K Char String)
^foobar$
>>> putPretty $ many ("foobar" :: K Char String)
^(foobar)*$
Instance details

Defined in Kleene.Functor.NonEmpty

Methods

pretty :: K1 c a -> String Source #

prettyS :: K1 c a -> ShowS Source #