Safe Haskell | Safe-Inferred |
---|---|
Language | Haskell2010 |
This module re-exports some of the interface for Text.PrettyPrint.Annotated.Leijen along with additional definitions useful for stack.
Synopsis
- class Pretty a where
- newtype StyleDoc = StyleDoc {}
- newtype StyleAnn = StyleAnn (Maybe Style)
- displayAnsi :: (Pretty a, HasLogFunc env, HasStylesUpdate env, MonadReader env m, HasCallStack) => Int -> a -> m Utf8Builder
- displayPlain :: (Pretty a, HasLogFunc env, HasStylesUpdate env, MonadReader env m, HasCallStack) => Int -> a -> m Utf8Builder
- renderDefault :: Int -> Doc a -> SimpleDoc a
- nest :: Int -> StyleDoc -> StyleDoc
- line :: StyleDoc
- linebreak :: StyleDoc
- group :: StyleDoc -> StyleDoc
- softline :: StyleDoc
- softbreak :: StyleDoc
- align :: StyleDoc -> StyleDoc
- hang :: Int -> StyleDoc -> StyleDoc
- indent :: Int -> StyleDoc -> StyleDoc
- encloseSep :: StyleDoc -> StyleDoc -> StyleDoc -> [StyleDoc] -> StyleDoc
- (<+>) :: StyleDoc -> StyleDoc -> StyleDoc
- hsep :: [StyleDoc] -> StyleDoc
- vsep :: [StyleDoc] -> StyleDoc
- fillSep :: [StyleDoc] -> StyleDoc
- sep :: [StyleDoc] -> StyleDoc
- hcat :: [StyleDoc] -> StyleDoc
- vcat :: [StyleDoc] -> StyleDoc
- fillCat :: [StyleDoc] -> StyleDoc
- cat :: [StyleDoc] -> StyleDoc
- punctuate :: StyleDoc -> [StyleDoc] -> [StyleDoc]
- fill :: Int -> StyleDoc -> StyleDoc
- fillBreak :: Int -> StyleDoc -> StyleDoc
- enclose :: StyleDoc -> StyleDoc -> StyleDoc -> StyleDoc
- squotes :: StyleDoc -> StyleDoc
- dquotes :: StyleDoc -> StyleDoc
- parens :: StyleDoc -> StyleDoc
- angles :: StyleDoc -> StyleDoc
- braces :: StyleDoc -> StyleDoc
- brackets :: StyleDoc -> StyleDoc
- string :: String -> StyleDoc
- annotate :: StyleAnn -> StyleDoc -> StyleDoc
- noAnnotate :: StyleDoc -> StyleDoc
- styleAnn :: Style -> StyleDoc -> StyleDoc
Pretty-print typeclass
Nothing
Instances
Pretty ModuleName Source # | |
Defined in Text.PrettyPrint.Leijen.Extended pretty :: ModuleName -> StyleDoc Source # | |
Pretty PrettyException Source # | |
Defined in RIO.PrettyPrint.PrettyException pretty :: PrettyException -> StyleDoc Source # | |
Pretty StyleDoc Source # | |
Pretty (Path b Dir) Source # | |
Pretty (Path b File) Source # | |
Ansi terminal Doc
A document annotated by a style
A style annotation.
displayAnsi :: (Pretty a, HasLogFunc env, HasStylesUpdate env, MonadReader env m, HasCallStack) => Int -> a -> m Utf8Builder Source #
displayPlain :: (Pretty a, HasLogFunc env, HasStylesUpdate env, MonadReader env m, HasCallStack) => Int -> a -> m Utf8Builder Source #
Selective re-exports from Text.PrettyPrint.Annotated.Leijen
Documents, parametrized by their annotations
Basic combinators
Alignment
Operators
List combinators
Fillers
Bracketing combinators
Character documents
Primitive type documents
string :: String -> StyleDoc Source #
The document string s
concatenates all characters in s
using line
for
newline characters and char
for all other characters. It is used whenever
the text contains newline characters.
Since: 0.1.4.0
Semantic annotations
noAnnotate :: StyleDoc -> StyleDoc Source #