Portability | portable |
---|---|
Stability | experimental |
Maintainer | Daniel Fischer <daniel.is.fischer@web.de> |
Transform separated_words identifiers to camelCase in Haskell source. Based on Richard O'Keefe's preprocessor hspp.
- camelSource :: Char -> String -> String
Documentation
camelSource :: Char -> String -> StringSource
Transform Haskell code written in separated_words style to the more common camelCase style.
camelSource sep source
removes all occurences of sep
in identifiers in source
between two letters of which
the first is in lower case after processing and
transforms the second to upper case.
Thus camelSource '_' "a_b_c" == "aB_c"
since after
processing the first underscore, the second is no longer
preceded by a lowercase letter.
Comments (and String
literals) are not transformed, so
haddock comments may need manual fixing.