ekmett/lens — pull request #499 by fizbin (2014-11-05 22:16:29+00:00)
Title: Restore a surprising corner case to makeFields name parsing.

Before lens 4.5, it was the case that this code produced lenses called
foo and bar:

data MyConfig { _mcFoo :: String, _mcBar :: String }
makeFields ''MyConfig

After 4.5, this code no longer worked as the prefix on record fields was
forced to be the type name (suitably capitalized). This change restores the
previous functionality, but only in those cases where all fields within a
given type that are to be lensed begin with the same prefix.

As a pleasant side effect, anyone who had worked around the pre-4.5 behavior with camel cased names by doing something like this:

data MyConfig { _myconfigFoo :: String, _myconfigBar :: String }
makeFields ''MyConfig

will have their code continue working without requiring changes.