| Safe Haskell | Safe-Inferred | 
|---|---|
| Language | Haskell2010 | 
Nixfmt.Pretty
Contents
Synopsis
- prettyCommentLine :: Text -> Doc
 - toLineComment :: Text -> Trivium
 - prettyTerm :: Term -> Doc
 - toLeading :: Maybe TrailingComment -> Trivia
 - prettyComma :: Maybe Leaf -> Doc
 - isAbsorbable :: Term -> Bool
 - absorb :: Doc -> Doc -> Maybe Int -> Expression -> Doc
 - absorbSet :: Expression -> Doc
 - absorbThen :: Expression -> Doc
 - absorbElse :: Expression -> Doc
 - absorbApp :: Expression -> Doc
 - isSimpleSelector :: Selector -> Bool
 - isSimple :: Expression -> Bool
 - hasQuotes :: [StringPart] -> Bool
 - hasDualQuotes :: [StringPart] -> Bool
 - endsInSingleQuote :: [StringPart] -> Bool
 - isIndented :: [[StringPart]] -> Bool
 - lastLineIsSpaces :: [[StringPart]] -> Bool
 - isInvisibleLine :: [StringPart] -> Bool
 - isSimpleString :: [[StringPart]] -> Bool
 - type UnescapeInterpol = Text -> Text
 - type EscapeText = Text -> Text
 - prettyLine :: EscapeText -> UnescapeInterpol -> [StringPart] -> Doc
 - prettySimpleString :: [[StringPart]] -> Doc
 - prettyIndentedString :: [[StringPart]] -> Doc
 
Documentation
prettyCommentLine :: Text -> Doc Source #
toLineComment :: Text -> Trivium Source #
prettyTerm :: Term -> Doc Source #
Pretty print a term without wrapping it in a group.
isAbsorbable :: Term -> Bool Source #
absorbSet :: Expression -> Doc Source #
absorbThen :: Expression -> Doc Source #
absorbElse :: Expression -> Doc Source #
absorbApp :: Expression -> Doc Source #
isSimpleSelector :: Selector -> Bool Source #
isSimple :: Expression -> Bool Source #
hasQuotes :: [StringPart] -> Bool Source #
hasDualQuotes :: [StringPart] -> Bool Source #
endsInSingleQuote :: [StringPart] -> Bool Source #
isIndented :: [[StringPart]] -> Bool Source #
lastLineIsSpaces :: [[StringPart]] -> Bool Source #
If the last line has at least one space but nothing else, it cannot be cleanly represented in an indented string.
isInvisibleLine :: [StringPart] -> Bool Source #
isSimpleString :: [[StringPart]] -> Bool Source #
type UnescapeInterpol = Text -> Text Source #
type EscapeText = Text -> Text Source #
prettyLine :: EscapeText -> UnescapeInterpol -> [StringPart] -> Doc Source #
prettySimpleString :: [[StringPart]] -> Doc Source #
prettyIndentedString :: [[StringPart]] -> Doc Source #
Orphan instances
| Pretty Binder Source # | |
| Pretty Expression Source # | |
Methods pretty :: Expression -> Doc Source #  | |
| Pretty File Source # | |
| Pretty ParamAttr Source # | |
| Pretty Parameter Source # | |
| Pretty Selector Source # | |
| Pretty SimpleSelector Source # | |
Methods pretty :: SimpleSelector -> Doc Source #  | |
| Pretty StringPart Source # | |
Methods pretty :: StringPart -> Doc Source #  | |
| Pretty Term Source # | |
| Pretty Token Source # | |
| Pretty TrailingComment Source # | |
Methods pretty :: TrailingComment -> Doc Source #  | |
| Pretty Trivium Source # | |
| Pretty a => Pretty (Ann a) Source # | |
| Pretty [StringPart] Source # | |
Methods pretty :: [StringPart] -> Doc Source #  | |
| Pretty [Token] Source # | |
| Pretty [Trivium] Source # | |
| Pretty [[StringPart]] Source # | |
Methods pretty :: [[StringPart]] -> Doc Source #  | |