autolib-todoc
Safe HaskellNone
LanguageHaskell98

Autolib.Multilingual.Doc

Synopsis

Documentation

renderStyle :: Style -> Doc -> String Source #

Deprecated: use renderStyleT instead

text :: String -> Doc Source #

for all languages

multitext :: [(Language, String)] -> Doc Source #

use several languages

nest :: Integral a => a -> Type Doc -> Type Doc Source #

char :: IsString a => Char -> Type a Source #

(<+>) :: Type Doc -> Type Doc -> Type Doc Source #

put side by side, and align the right argument

(<>) :: Semigroup a => a -> a -> a infixr 6 #

An associative operation.

Examples

Expand
>>> [1,2,3] <> [4,5,6]
[1,2,3,4,5,6]
>>> Just [1, 2, 3] <> Just [4, 5, 6]
Just [1,2,3,4,5,6]
>>> putStr "Hello, " <> putStrLn "World!"
Hello, World!

(<+.>) :: Doc -> Doc -> Doc Source #

put side by side, without alignment (you don't want to use this, mostly)

(<.>) :: Doc -> Doc -> Doc Source #

encloseSep :: Semigroup a => Type ([b] -> a) -> Type ([b] -> a) -> Type ([b] -> a) -> [Type b] -> Type a Source #

align :: Type b -> Type b Source #

punctuate :: Semigroup t => t -> [t] -> [t] Source #

fill :: Type (p -> a -> a) Source #

Orphan instances

Monoid Doc Source # 
Instance details

Methods

mempty :: Doc #

mappend :: Doc -> Doc -> Doc #

mconcat :: [Doc] -> Doc #

Semigroup Doc Source # 
Instance details

Methods

(<>) :: Doc -> Doc -> Doc #

sconcat :: NonEmpty Doc -> Doc #

stimes :: Integral b => b -> Doc -> Doc #

Show Doc Source # 
Instance details

Methods

showsPrec :: Int -> Doc -> ShowS #

show :: Doc -> String #

showList :: [Doc] -> ShowS #