disco-0.1.6: Functional programming language for teaching discrete math.
Copyrightdisco team and contributors
LicenseBSD-3-Clause
Maintainerbyorgey@gmail.com
Safe HaskellSafe-Inferred
LanguageHaskell2010

Disco.Pretty.DSL

Description

Adapter DSL on top of Text.PrettyPrint for Applicative pretty-printing.

Documentation

vcat :: Applicative f => [f (Doc ann)] -> f (Doc ann) Source #

hcat :: Applicative f => [f (Doc ann)] -> f (Doc ann) Source #

hsep :: Applicative f => [f (Doc ann)] -> f (Doc ann) Source #

parens :: Functor f => f (Doc ann) -> f (Doc ann) Source #

brackets :: Functor f => f (Doc ann) -> f (Doc ann) Source #

braces :: Functor f => f (Doc ann) -> f (Doc ann) Source #

bag :: Applicative f => f (Doc ann) -> f (Doc ann) Source #

quotes :: Functor f => f (Doc ann) -> f (Doc ann) Source #

doubleQuotes :: Functor f => f (Doc ann) -> f (Doc ann) Source #

text :: Applicative m => String -> m (Doc ann) Source #

integer :: Applicative m => Integer -> m (Doc ann) Source #

nest :: Functor f => Int -> f (Doc ann) -> f (Doc ann) Source #

indent :: Functor f => Int -> f (Doc ann) -> f (Doc ann) Source #

hang :: Applicative f => f (Doc ann) -> Int -> f (Doc ann) -> f (Doc ann) Source #

empty :: Applicative m => m (Doc ann) Source #

(<+>) :: Applicative f => f (Doc ann) -> f (Doc ann) -> f (Doc ann) Source #

(<>) :: Applicative f => f (Doc ann) -> f (Doc ann) -> f (Doc ann) Source #

($+$) :: Applicative f => f (Doc ann) -> f (Doc ann) -> f (Doc ann) Source #

punctuate :: Applicative f => f (Doc ann) -> [f (Doc ann)] -> f [f (Doc ann)] Source #

intercalate :: Monad f => f (Doc ann) -> [f (Doc ann)] -> f (Doc ann) Source #

bulletList :: Applicative f => f (Doc ann) -> [f (Doc ann)] -> f (Doc ann) Source #

renderDoc :: Sem (Reader PA ': r) (Doc ann) -> Sem r String Source #

Orphan instances

IsString (Sem r (Doc ann)) Source # 
Instance details

Methods

fromString :: String -> Sem r (Doc ann) #