napkin-1.0.0
Safe HaskellNone
LanguageGHC2021

Napkin.Render.PrettyPrint

Documentation

newtype ME a #

Constructors

ME (Either Text a) 

Instances

Instances details
IsString Doc # 
Instance details

Defined in Napkin.Render.PrettyPrint

Methods

fromString :: String -> Doc #

Applicative ME # 
Instance details

Defined in Napkin.Render.PrettyPrint

Methods

pure :: a -> ME a #

(<*>) :: ME (a -> b) -> ME a -> ME b #

liftA2 :: (a -> b -> c) -> ME a -> ME b -> ME c #

(*>) :: ME a -> ME b -> ME b #

(<*) :: ME a -> ME b -> ME a #

Functor ME # 
Instance details

Defined in Napkin.Render.PrettyPrint

Methods

fmap :: (a -> b) -> ME a -> ME b #

(<$) :: a -> ME b -> ME a #

Monad ME # 
Instance details

Defined in Napkin.Render.PrettyPrint

Methods

(>>=) :: ME a -> (a -> ME b) -> ME b #

(>>) :: ME a -> ME b -> ME b #

return :: a -> ME a #

Monoid a => Monoid (ME a) # 
Instance details

Defined in Napkin.Render.PrettyPrint

Methods

mempty :: ME a #

mappend :: ME a -> ME a -> ME a #

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

Semigroup a => Semigroup (ME a) # 
Instance details

Defined in Napkin.Render.PrettyPrint

Methods

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

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

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

Eq a => Eq (ME a) # 
Instance details

Defined in Napkin.Render.PrettyPrint

Methods

(==) :: ME a -> ME a -> Bool #

(/=) :: ME a -> ME a -> Bool #

toEither :: ME a -> Either Text a #

type Doc = ME Doc #

(<+>) :: Doc -> Doc -> Doc infixl 6 #

($$) :: Doc -> Doc -> Doc infixl 5 #

($+$) :: Doc -> Doc -> Doc infixl 5 #

txt :: Text -> Doc #

parens :: Doc -> Doc #

quotes :: Doc -> Doc #

angles :: [Doc] -> Doc #

nest :: Int -> Doc -> Doc #

int :: Int -> Doc #

sep :: [Doc] -> Doc #

hang :: Doc -> Int -> Doc -> Doc #

vcat :: [Doc] -> Doc #

hcat :: [Doc] -> Doc #

hsep :: [Doc] -> Doc #

punctuate :: Doc -> [Doc] -> [Doc] #

error :: Text -> Doc #