NondecreasingIndentation (& de-tabbing several .hs files)

Herbert Valerio Riedel hvriedel at gmail.com
Thu May 29 09:35:41 UTC 2014


On 2014-05-29 at 09:17:58 +0200, Simon Marlow wrote:
>> While I refactored the ghc code base to declare LANGUAGE pragmas
>> locally, rather than via -X-flags on the GHC commandline, I've noticed
>> there were a couple of places where NondecreasingIndentation grammar was used.
>>
>> What's the current consensus on the use of NondecreasingIndentation? Is
>> its use still encouraged?
>
> I like it for things like
>
>    do
>      ...
>      if exit_early then return () else do
>      ... more  stuff ...
>
> Without NondecreasingIndentation this creeps to the right, which isn't
> a good use of whitespace.

I see, so NondecreasingIndentation is mostly used to simulate
early-returns?



More information about the ghc-devs mailing list