[C2hs] Re: Patch: Don't lowercase existing CamelCase
benjovi at gmx.net
Sat Jan 24 19:28:38 EST 2009
On 24.01.2009, at 22:29, Achim Schneider wrote:
> Duncan Coutts <duncan.coutts at worc.ox.ac.uk> wrote:
>> < let lowerFirst (c:cs) = toLower c : cs
>> < in onlyPosIdent (posOf ide) (lowerFirst $ identToLexeme ide)
>>> onlyPosIdent (posOf ide) (identToLexeme ide)
>> This one I don't understand. I don't understand why converting the
>> first char to lower case is bad here or how it relates to your
> Me neither. The problem is that, if the original is FunctionFoo and
> renamed functionFoo, the original code thinks that they're the same
> replaces functionFoo with Nothing, ...
I agree with Duncan that the second part of the patch
< adjustCase (c:cs) = toUpper c : map toLower cs
adjustCase (c:cs) = toUpper c : cs
is fine. I tried it, and it seems to work.
I think we would not want to apply the first part of the patch. The
problem is elsewhere, but I think I've already fixed this before.
Could you try whether the second part of the patch alone works fine
with the latest c2hs ?
If not, could you give a detailed description of the problem you're
experiencing when not applying the first part ?
More information about the C2hs