silkscreen-0.0.0.1: Prettyprinting transformers.
Safe HaskellNone
LanguageHaskell2010

Silkscreen.Printer.Prec

Synopsis

Precedence printer

runPrec :: level -> Prec level a -> a Source #

newtype Prec level a Source #

Constructors

Prec (level -> a) 

Instances

Instances details
Monad (Prec level) Source # 
Instance details

Defined in Silkscreen.Printer.Prec

Methods

(>>=) :: Prec level a -> (a -> Prec level b) -> Prec level b #

(>>) :: Prec level a -> Prec level b -> Prec level b #

return :: a -> Prec level a #

Functor (Prec level) Source # 
Instance details

Defined in Silkscreen.Printer.Prec

Methods

fmap :: (a -> b) -> Prec level a -> Prec level b #

(<$) :: a -> Prec level b -> Prec level a #

Applicative (Prec level) Source # 
Instance details

Defined in Silkscreen.Printer.Prec

Methods

pure :: a -> Prec level a #

(<*>) :: Prec level (a -> b) -> Prec level a -> Prec level b #

liftA2 :: (a -> b -> c) -> Prec level a -> Prec level b -> Prec level c #

(*>) :: Prec level a -> Prec level b -> Prec level b #

(<*) :: Prec level a -> Prec level b -> Prec level a #

(Bounded level, Show a) => Show (Prec level a) Source # 
Instance details

Defined in Silkscreen.Printer.Prec

Methods

showsPrec :: Int -> Prec level a -> ShowS #

show :: Prec level a -> String #

showList :: [Prec level a] -> ShowS #

Semigroup a => Semigroup (Prec level a) Source # 
Instance details

Defined in Silkscreen.Printer.Prec

Methods

(<>) :: Prec level a -> Prec level a -> Prec level a #

sconcat :: NonEmpty (Prec level a) -> Prec level a #

stimes :: Integral b => b -> Prec level a -> Prec level a #

Monoid a => Monoid (Prec level a) Source # 
Instance details

Defined in Silkscreen.Printer.Prec

Methods

mempty :: Prec level a #

mappend :: Prec level a -> Prec level a -> Prec level a #

mconcat :: [Prec level a] -> Prec level a #

(Bounded level, Printer a) => Printer (Prec level a) Source # 
Instance details

Defined in Silkscreen.Printer.Prec

Associated Types

type Ann (Prec level a) Source #

Methods

liftDoc0 :: Doc (Ann (Prec level a)) -> Prec level a Source #

liftDoc1 :: (Doc (Ann (Prec level a)) -> Doc (Ann (Prec level a))) -> Prec level a -> Prec level a Source #

liftDoc2 :: (Doc (Ann (Prec level a)) -> Doc (Ann (Prec level a)) -> Doc (Ann (Prec level a))) -> Prec level a -> Prec level a -> Prec level a Source #

enclosing :: Prec level a -> Prec level a -> Prec level a -> Prec level a Source #

squotes :: Prec level a -> Prec level a Source #

dquotes :: Prec level a -> Prec level a Source #

parens :: Prec level a -> Prec level a Source #

brackets :: Prec level a -> Prec level a Source #

braces :: Prec level a -> Prec level a Source #

angles :: Prec level a -> Prec level a Source #

column :: (Int -> Prec level a) -> Prec level a Source #

nesting :: (Int -> Prec level a) -> Prec level a Source #

pageWidth :: (PageWidth -> Prec level a) -> Prec level a Source #

(Bounded level, NestingPrinter p) => NestingPrinter (Prec level p) Source # 
Instance details

Defined in Silkscreen.Printer.Prec

Methods

askingNesting :: (Int -> Prec level p) -> Prec level p Source #

localNesting :: (Int -> Int) -> Prec level p -> Prec level p Source #

applyNesting :: Prec level p -> Prec level p Source #

(Bounded level, Printer a) => PrecedencePrinter (Prec level a) Source # 
Instance details

Defined in Silkscreen.Printer.Prec

Associated Types

type Level (Prec level a) Source #

Methods

askingPrec :: (Level (Prec level a) -> Prec level a) -> Prec level a Source #

localPrec :: (Level (Prec level a) -> Level (Prec level a)) -> Prec level a -> Prec level a Source #

type Ann (Prec level a) Source # 
Instance details

Defined in Silkscreen.Printer.Prec

type Ann (Prec level a) = Ann a
type Level (Prec level a) Source # 
Instance details

Defined in Silkscreen.Printer.Prec

type Level (Prec level a) = level

Re-exports