RFC: style cleanup & guidelines for GHC, and related bikeshedding

Sergei Trofimovich slyich at gmail.com
Wed Jul 2 21:35:05 UTC 2014


On Wed, 2 Jul 2014 14:59:13 -0500
Austin Seipp <austin at well-typed.com> wrote:

> Hi *,
> 
> First off, WARNING: BIKESHEDDING AHEAD.
> 
> With that out of the way - today on IRC, there was some discussion
> about some stylistic/consistency issues in GHC, and being spurred by
> Johans recent proposal for top-level documentation, I figured perhaps
> we should beat the drum on this issue as well.
> 
> The TL;DR is that GHC has a lot of inconsistent style issues,
> including things like:
> 
>  - Mixing literate haskell with non-literate haskell files
>  - Legacy code with tabs and spaces intermixed
>  - Related to the last one, trailing whitespace
>  - Mixing styles of do notation in different parts of the compiler
> (braces vs no braces)
>  - Probably things like indentation mismatches even in the same code
>  - Probably many other things I've missed, obvious or not.

I'd vote for detabbing/un-.lhs-ing in one go and ASAP. Fore example, this weekend.
There will always be people creating derivative work on top of current source tree.
I, for example, didn't dare to detab rts bits to make patches readable.

Detabbing commits are very easy to check in git: 'git show -w' (should output nothing).
It's a pain for current patches, but I'd say it's bearable.

The rest of changes are harder to achieve, but should be quite easy to maintain
with hlint forcing one rule (everyone agree on) at a time.

-- 

  Sergei
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 198 bytes
Desc: not available
URL: <http://www.haskell.org/pipermail/ghc-devs/attachments/20140703/220f06d4/attachment.sig>


More information about the ghc-devs mailing list