Good Haskell Style

David Roundy <droundy at darcs.net> writes:
> Trailing white space doesn't particularly hurt, except if you're using
> version control, in which case any removal of white space is liable to
> conflict with actual coding changes, so it's better to have a policy that
> it shouldn't be included.
This is surely an issue with either the language definition
or the version control system. In general, we ought to aim
for a state of affairs where every requirement we make is
mechannically checked. In this particular case, I'd say that
the version control system ought to be more syntactically
aware when looking for differences¹, for example by removing
all trailing space before doing comparisons (and making sure
that anything extracted from the repo has none).
> 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.
[1] this isn't the only place where a version control system
that understood more of the language would be useful: for
example, rather than having to specify a regexp, I'd like
darcs replace to pick one (from a configuration file?)
depending on language.
--
Jón Fairbairn Jon.Fairbairn at cl.cam.ac.uk