[Haskell-cafe] Re: Proper round-trip HughesPJ/Parsec for Doubles?

Neil Brown nccb2 at kent.ac.uk
Thu Feb 25 07:41:00 EST 2010

Andy Gimblett wrote:
>> 1. break the line after "do"
>> (to avoid a layout change when change name or arguments of float' or
>> rename the variable "e")
> I'm not convinced by this; perhaps while editing the code it's useful, 
> but those changes don't happen very often, and when they do, any 
> half-decent editor ought to be able to handle making the change 
> consistently.  I do sometimes drop the do to the next line, but 
> usually in order to keep things within 80 columns.  I think this is 
> somewhat a matter of personal taste though.  More on this at the end...
I think the implication is that the layout change you mention will cause 
a version control commit to look like the whole function changed, 
whereas if you didn't have to alter the indent, it would be clear that 
the only lines that changed are the one introducing the extra parameter, 
and any subsequent lines that need to be changed to use the parameter.  
BTW, to add another option, I like this style:

float' t
  = do ...



More information about the Haskell-Cafe mailing list