haskell-gi-0.20.3: Generate Haskell bindings for GObject Introspection capable libraries

Safe HaskellSafe
LanguageHaskell98

Data.GI.CodeGen.Util

Synopsis

Documentation

padTo :: Int -> Text -> Text #

ucFirst :: Text -> Text #

Capitalize the first character of the given string.

lcFirst :: Text -> Text #

Make the first character of the given string lowercase.

modifyQualified :: (Text -> Text) -> Text -> Text #

Apply the given modification function to the given symbol. If the symbol is qualified the modification will only apply to the last component.

tshow :: Show a => a -> Text #

Construct the Text representation of a showable.

terror :: Text -> a #

Throw an error with the given Text.

utf8ReadFile :: FilePath -> IO Text #

Read a file assuming it is UTF-8 encoded. If decoding fails this calls error.

utf8WriteFile :: FilePath -> Text -> IO () #

Write the given Text into an UTF-8 encoded file.

splitOn :: Eq a => a -> [a] -> [[a]] #

Split a list into sublists delimited by the given element.