[C2hs] Re: Patch: Don't lowercase existing CamelCase

Achim Schneider barsoap at web.de
Sat Jan 24 16:29:43 EST 2009

Duncan Coutts <duncan.coutts at worc.ox.ac.uk> wrote:

> 930,931c930
> <     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
> example.
Me neither. The problem is that, if the original is FunctionFoo and the
renamed functionFoo, the original code thinks that they're the same and
replaces functionFoo with Nothing, which then amounts to outputing

{#fun FunctionFoo {...#}
instead of
{#fun FunctionFoo as functionFoo {...#}

, which of course chokes ghc. 

(c) this sig last receiving data processing entity. Inspect headers
for copyright history. All rights reserved. Copying, hiring, renting,
performance and/or quoting of this signature prohibited.

More information about the C2hs mailing list