silkscreen-0.0.0.2: Prettyprinting transformers.
Safe HaskellNone
LanguageHaskell2010

Silkscreen.Printer.Rainbow

Synopsis

Rainbow parentheses

runRainbow :: (Int -> a -> a) -> Int -> Rainbow a -> a Source #

newtype Rainbow a Source #

Constructors

Rainbow ((Int -> a -> a) -> Int -> a) 

Instances

Instances details
Show a => Show (Rainbow a) Source # 
Instance details

Defined in Silkscreen.Printer.Rainbow

Methods

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

show :: Rainbow a -> String #

showList :: [Rainbow a] -> ShowS #

Semigroup a => Semigroup (Rainbow a) Source # 
Instance details

Defined in Silkscreen.Printer.Rainbow

Methods

(<>) :: Rainbow a -> Rainbow a -> Rainbow a #

sconcat :: NonEmpty (Rainbow a) -> Rainbow a #

stimes :: Integral b => b -> Rainbow a -> Rainbow a #

Monoid a => Monoid (Rainbow a) Source # 
Instance details

Defined in Silkscreen.Printer.Rainbow

Methods

mempty :: Rainbow a #

mappend :: Rainbow a -> Rainbow a -> Rainbow a #

mconcat :: [Rainbow a] -> Rainbow a #

Printer a => Printer (Rainbow a) Source # 
Instance details

Defined in Silkscreen.Printer.Rainbow

Associated Types

type Ann (Rainbow a) Source #

Methods

liftDoc0 :: Doc (Ann (Rainbow a)) -> Rainbow a Source #

liftDoc1 :: (Doc (Ann (Rainbow a)) -> Doc (Ann (Rainbow a))) -> Rainbow a -> Rainbow a Source #

liftDoc2 :: (Doc (Ann (Rainbow a)) -> Doc (Ann (Rainbow a)) -> Doc (Ann (Rainbow a))) -> Rainbow a -> Rainbow a -> Rainbow a Source #

enclosing :: Rainbow a -> Rainbow a -> Rainbow a -> Rainbow a Source #

squotes :: Rainbow a -> Rainbow a Source #

dquotes :: Rainbow a -> Rainbow a Source #

parens :: Rainbow a -> Rainbow a Source #

brackets :: Rainbow a -> Rainbow a Source #

braces :: Rainbow a -> Rainbow a Source #

angles :: Rainbow a -> Rainbow a Source #

column :: (Int -> Rainbow a) -> Rainbow a Source #

nesting :: (Int -> Rainbow a) -> Rainbow a Source #

pageWidth :: (PageWidth -> Rainbow a) -> Rainbow a Source #

Printer a => NestingPrinter (Rainbow a) Source # 
Instance details

Defined in Silkscreen.Printer.Rainbow

PrecedencePrinter p => PrecedencePrinter (Rainbow p) Source # 
Instance details

Defined in Silkscreen.Printer.Rainbow

Associated Types

type Level (Rainbow p) Source #

Methods

askingPrec :: (Level (Rainbow p) -> Rainbow p) -> Rainbow p Source #

localPrec :: (Level (Rainbow p) -> Level (Rainbow p)) -> Rainbow p -> Rainbow p Source #

type Ann (Rainbow a) Source # 
Instance details

Defined in Silkscreen.Printer.Rainbow

type Ann (Rainbow a) = Ann a
type Level (Rainbow p) Source # 
Instance details

Defined in Silkscreen.Printer.Rainbow

type Level (Rainbow p) = Level p

Re-exports