Safe Haskell | Safe-Inferred |
---|---|
Language | Haskell2010 |
Synopsis
- newtype Pretty a = Pretty String
- class Show a => PrettyPrint a where
- escapedHash :: Text
- hash :: Text
- dropLen :: Text -> Text -> Text
- startsWith :: Text -> Text -> Bool
- endsWith :: Text -> Text -> Bool
- stripEnds :: Text -> Text -> Text -> Text
- stripSpaces :: Text -> Text
- stripList :: Eq a => a -> [a] -> [a]
- indentN :: Int -> Text -> Text
- constructorName :: Data a => a -> String
- stripEmpties :: [Text] -> [Text]
- dropEmpties :: [Text] -> [Text]
- isEnclosedWith :: Text -> Text -> Text -> Bool
- countSpaces :: Text -> Int
- errorEmptyCommentAt :: Show a1 => a1 -> a2
- prependTexComment :: Text -> Text
- dropTexComment :: Show a => Text -> a -> Text
- texComment :: Text
- texCommentSpace :: Text
- lhsComment :: Text
- lhsCommentSpace :: Text
- lhsHsCode :: Text
- lhsHsCodeSpace :: Text
- prependLhsComment :: Text -> Text
- dropLhsComment :: Show a => Text -> a -> Text
- lhsUnescapeHash :: Text -> Text
- lhsEscapeHash :: Text -> Text
- mdCommentOpen :: Text
- mdCommentClose :: Text
- mdCommentOpenSpace :: Text
- mdCommentCloseSpace :: Text
- stripMdComment :: Text -> Text
- isMdComment :: Text -> Bool
- hsCommentOpen :: Text
- hsCommentOpenSpace :: Text
- hsCommentClose :: Text
- hsCommentCloseSpace :: Text
- stripHsComment :: Text -> Text
- isHsComment :: Text -> Bool
Documentation
A wrapper for prettyprinting strings
class Show a => PrettyPrint a where Source #
A class for prettyprinting data on multiple lines in haddocks.
It's not meant to be used outside of this library.
pp :: a -> Pretty String Source #
A printing function
It's not meant to be used outside of this library.
Instances
escapedHash :: Text Source #
Escaped hash character
stripEnds :: Text -> Text -> Text -> Text Source #
Drop leading spaces and drop at each end of a Text
the number of characters as in the supplied prefix and suffix.
stripList :: Eq a => a -> [a] -> [a] Source #
Strip the given value from the beginning and the end of a list.
constructorName :: Data a => a -> String Source #
Show the name of a constructor.
stripEmpties :: [Text] -> [Text] Source #
Remove empty lines from the beginning and the end of a list.
dropEmpties :: [Text] -> [Text] Source #
Drop leading empty strings
isEnclosedWith :: Text -> Text -> Text -> Bool Source #
Check if a line without leading spaces is surrounded by the given Text
s.
errorEmptyCommentAt :: Show a1 => a1 -> a2 Source #
Show error with line number for a token. errorEmptyCommentAt :: Int -> String
texComment :: Text Source #
Start a TeX
comment.
texCommentSpace :: Text Source #
Start a TeX
comment plus a space.
lhsComment :: Text Source #
Start a Literate Haskell
comment.
lhsCommentSpace :: Text Source #
Start a Literate Haskell
comment plus a space.
lhsHsCodeSpace :: Text Source #
Start a Literate Haskell
line of Haskell
code plus a space.
mdCommentOpen :: Text Source #
Open a Markdown
comment.
mdCommentClose :: Text Source #
Close a Markdown
comment.
mdCommentOpenSpace :: Text Source #
Open a Markdown
comment plus a space.
mdCommentCloseSpace :: Text Source #
A space plus close a Markdown
comment.
isMdComment :: Text -> Bool Source #
Check if a line is a Markdown
comment.
hsCommentOpen :: Text Source #
Open a Haskell
multi-line comment.
hsCommentOpenSpace :: Text Source #
Open a Haskell
multi-line comment plus a space.
hsCommentClose :: Text Source #
Close a Haskell
multi-line comment.
hsCommentCloseSpace :: Text Source #
A space plus close a Haskell
multi-line comment.
stripHsComment :: Text -> Text Source #
Drop leading spaces and drop at each end of a Text
the number of characters as in the supplied prefix and suffix.
isHsComment :: Text -> Bool Source #
Check if a line without leading zeros is a multi-line Haskell
comment