cplug-0.2.0.0: Recompile and run partially applied C functions in Haskell, during runtime

Safe HaskellNone
LanguageHaskell2010

Data.Text.Aux

Synopsis

Documentation

showInt :: Int -> Text Source

showInt should be equivalent to `pack . show` for the Int type, except a bit faster since it uses Text library functions

textAp :: String -> Text -> Text Source

Example:

>>> textAp "Hello" "World"
"Hello (World)"

wrapText :: Char -> Text -> Text Source

Example:

>>> wrapText '|' "text"
"|text|"

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"

parens :: Text -> Text Source

Add parentheses around a Text object

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.

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