Safe Haskell | None |
---|---|
Language | Haskell2010 |
- showInt :: Int -> Text
- textAp :: String -> Text -> Text
- wrapText :: Char -> Text -> Text
- addArrows :: [Text] -> Text
- unwords2 :: Text -> Text -> Text
- appendAfter :: Text -> Text -> Text -> Text
- parens :: Text -> Text
- wordLines :: Text -> [[Text]]
- unWordLines :: [[Text]] -> Text
- packUnlines :: [String] -> Text
- packUnwords :: [String] -> Text
- prettyShowt :: Pretty p => p -> Text
Documentation
addArrows :: [Text] -> Text Source
Example:
>>>
addArrows . map T.pack ["Bool", "String", "Int"]
"Bool -> String -> Int"
unwords2 :: Text -> Text -> Text Source
Example:
>>>
unwords2 (T.pack "Hello") (T.pack "World")
"Hello World"
appendAfter :: Text -> Text -> Text -> Text Source
Example:
>>>
appendAfter ", " "Hello" "World"
"Hello, World"
wordLines :: Text -> [[Text]] Source
wordLines
converts a Text input to a list of lists, where
`wordLines text !! i !! j` is the jth word of the ith line of text
.
unWordLines :: [[Text]] -> Text Source
See wordLines
packUnlines :: [String] -> Text Source
Shortcut for
unlines . map pack
packUnwords :: [String] -> Text Source
Shortcut for
unwords . map pack
prettyShowt :: Pretty p => p -> Text Source
Convert a pretty-printable object to Text