Safe Haskell | Safe-Inferred |
---|---|
Language | Haskell2010 |
Synopsis
- prime :: Text -> Text
- parenthesize :: Text -> Text
- padTo :: Int -> Text -> Text
- withComment :: Text -> Text -> Text
- ucFirst :: Text -> Text
- lcFirst :: Text -> Text
- modifyQualified :: (Text -> Text) -> Text -> Text
- tshow :: Show a => a -> Text
- terror :: HasCallStack => Text -> a
- utf8ReadFile :: FilePath -> IO Text
- utf8WriteFile :: FilePath -> Text -> IO ()
- splitOn :: Eq a => a -> [a] -> [[a]]
- printWarning :: Text -> IO ()
Documentation
parenthesize :: Text -> Text Source #
withComment :: Text -> Text -> Text Source #
modifyQualified :: (Text -> Text) -> Text -> Text Source #
Apply the given modification function to the given symbol. If the symbol is qualified the modification will only apply to the last component.
terror :: HasCallStack => Text -> a Source #
Throw an error with the given Text
.
utf8ReadFile :: FilePath -> IO Text Source #
Read a file assuming it is UTF-8 encoded. If decoding fails this
calls error
.
utf8WriteFile :: FilePath -> Text -> IO () Source #
Write the given Text
into an UTF-8 encoded file.
splitOn :: Eq a => a -> [a] -> [[a]] Source #
Split a list into sublists delimited by the given element.
printWarning :: Text -> IO () Source #
Print a (colored) warning message to stderr