haskell-gi-0.24.0: Generate Haskell bindings for GObject Introspection capable libraries
Safe HaskellSafe-Inferred
LanguageHaskell2010

Data.GI.CodeGen.Util

Synopsis

Documentation

prime :: Text -> Text Source #

parenthesize :: Text -> Text Source #

padTo :: Int -> Text -> Text Source #

withComment :: Text -> Text -> Text Source #

ucFirst :: Text -> Text Source #

Capitalize the first character of the given string.

lcFirst :: Text -> Text Source #

Make the first character of the given string lowercase.

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.

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

Construct the Text representation of a showable.

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