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

Safe HaskellNone
LanguageHaskell98

Data.GI.CodeGen.SymbolNaming

Synopsis

Documentation

qualify :: Text -> CodeGen Text Source

Return the qualified namespace (ns ++ "." or "", depending on whether ns is the current namespace).

noName :: Text -> CodeGen () Source

Save a bit of typing for optional arguments in the case that we want to pass Nothing.

escapedArgName :: Arg -> Text Source

Name for the given argument, making sure it is a valid Haskell argument name (and escaping it if not).

hyphensToCamelCase :: Text -> Text Source

For a string of the form "one-sample-string" return OneSampleString

underscoresToCamelCase :: Text -> Text Source

Similarly, turn a name separated_by_underscores into CamelCase. We preserve final and initial underscores, and n>1 consecutive underscores are transformed into n-1 underscores.