mkName package:BNFC

Generate a name in the given case style taking into account the reserved word of the language. Note that despite the fact that those name are mainly to be used in code rendering (type Doc), we return a String here to allow further manipulation of the name (like disambiguation) which is not possible in the Doc type. Examples:
>>> mkName [] LowerCase "FooBAR"
"foobar"
>>> mkName [] UpperCase "FooBAR"
"FOOBAR"
>>> mkName [] SnakeCase "FooBAR"
"foo_bar"
>>> mkName [] CamelCase "FooBAR"
"FooBAR"
>>> mkName [] CamelCase "Foo_bar"
"FooBar"
>>> mkName [] MixedCase "FooBAR"
"fooBAR"
>>> mkName ["foobar"] LowerCase "FooBAR"
"foobar_"
>>> mkName ["foobar", "foobar_"] LowerCase "FooBAR"
"foobar__"
Determine the modules' namespace
>>> mkNamespace defaultOptions
""

>>> mkNamespace defaultOptions { lang = "Bla", inDir = True }
"Bla"

>>> mkNamespace defaultOptions { inPackage = Just "My.Cool.Package" }
"My.Cool.Package"

>>> mkNamespace defaultOptions { lang = "bla_bla", inDir = True }
"BlaBla"

>>> mkNamespace defaultOptions { lang = "bla", inDir = True, inPackage = Just "P"}
"P.Bla"
Same as above but accept a list as argument and make sure that the names generated are uniques.
>>> mkNames ["c"] LowerCase ["A", "b_", "a_", "c"]
["a1","b","a2","c_"]