Good Haskell Style

Jon Fairbairn jon.fairbairn at cl.cam.ac.uk
Fri Aug 3 10:38:04 EDT 2007


Benjamin Franksen <benjamin.franksen at bessy.de> writes:

> Jon Fairbairn wrote:
> > David Roundy <droundy at darcs.net> writes:
> >>  I've certainly never heard of a scenario in which
> >> trailing white space is beneficial.
> > 
> > Neither have I, but since it's invisible, asking that it not
> > be there without providing automatic mechanical assistance
> > is to add a tedious burden.
> 
> sed -e 's/[ \t]+$//'

Not the whole story, surely; you must want me to do
something like create sort-it:

#!/bin/bash 
find /home/jf -name \*.hs -o -name \*.lhs | xargs -IX sed -i.bak -e 's/[ \t]+$//' X

and put it in a my crontab to run once a day? Otherwise it's
not automatic. Only, strangely enough, what you wrote
doesn't work (s/-e/-r/).

-- 
Jón Fairbairn                                 Jon.Fairbairn at cl.cam.ac.uk




More information about the Libraries mailing list