Safe Haskell | None |
---|---|
Language | Haskell98 |
- qualify :: Text -> CodeGen Text
- lowerName :: Name -> Text
- upperName :: Name -> CodeGen Text
- noName :: Text -> CodeGen ()
- escapedArgName :: Arg -> Text
- classConstraint :: Text -> Text
- hyphensToCamelCase :: Text -> Text
- underscoresToCamelCase :: Text -> Text
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).
classConstraint :: Text -> Text Source
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.