Re: NondecreasingIndentation ( de-tabbing several .hs files)
On 15/05/2014 11:12, Herbert Valerio Riedel wrote: Hello GHC devs, 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. Cheers, Simon Moreover, I touched several files (over 300) while refactoring, would that qualify as working on this module in the sense of | While working on this module you are encouraged to remove it and detab | the module (please do the detabbing in a separate patch). or would that overreach wrt the original intent of the guideline quoted above? Cheers, hvr ___ ghc-devs mailing list ghc-devs@haskell.org http://www.haskell.org/mailman/listinfo/ghc-devs ___ ghc-devs mailing list ghc-devs@haskell.org http://www.haskell.org/mailman/listinfo/ghc-devs
Re: NondecreasingIndentation ( de-tabbing several .hs files)
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? ___ ghc-devs mailing list ghc-devs@haskell.org http://www.haskell.org/mailman/listinfo/ghc-devs
Re: NondecreasingIndentation ( de-tabbing several .hs files)
On 05/15/2014 12:12 PM, Herbert Valerio Riedel wrote: Hello GHC devs, 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? Moreover, I touched several files (over 300) while refactoring, would that qualify as working on this module in the sense of | While working on this module you are encouraged to remove it and detab | the module (please do the detabbing in a separate patch). or would that overreach wrt the original intent of the guideline quoted above? Cheers, hvr ___ ghc-devs mailing list ghc-devs@haskell.org http://www.haskell.org/mailman/listinfo/ghc-devs Is there a reason behind not just detabbing (and removing trailing whitespace) the whole tree in a patch? If you're going to detab in a separate patch anyway, might as well do all of it once and for all. -- Mateusz K. ___ ghc-devs mailing list ghc-devs@haskell.org http://www.haskell.org/mailman/listinfo/ghc-devs
Re: NondecreasingIndentation ( de-tabbing several .hs files)
On Fri, May 16, 2014 at 3:33 PM, Mateusz Kowalczyk fuuze...@fuuzetsu.co.ukwrote: Is there a reason behind not just detabbing (and removing trailing whitespace) the whole tree in a patch? If you're going to detab in a separate patch anyway, might as well do all of it once and for all. There are two reasons: * Main reason: it will create lots of merge conflicts for people working on the code base. * Minor reason: you will now be 'git blame'd for most lines of the source. It's possible to have git ignore that, but it's a source of annoyance. ___ ghc-devs mailing list ghc-devs@haskell.org http://www.haskell.org/mailman/listinfo/ghc-devs
Re: NondecreasingIndentation ( de-tabbing several .hs files)
On 05/16/2014 03:35 PM, Johan Tibell wrote: On Fri, May 16, 2014 at 3:33 PM, Mateusz Kowalczyk fuuze...@fuuzetsu.co.ukwrote: Is there a reason behind not just detabbing (and removing trailing whitespace) the whole tree in a patch? If you're going to detab in a separate patch anyway, might as well do all of it once and for all. There are two reasons: * Main reason: it will create lots of merge conflicts for people working on the code base. I suppose such action would be announced a week or so beforehand but yes, I suppose. * Minor reason: you will now be 'git blame'd for most lines of the source. It's possible to have git ignore that, but it's a source of annoyance. It does not matter I feel because you're encouraged to detab in a separate patch anyway so blaming will show that whether it's all done at once or separately. -- Mateusz K. ___ ghc-devs mailing list ghc-devs@haskell.org http://www.haskell.org/mailman/listinfo/ghc-devs
Re: NondecreasingIndentation ( de-tabbing several .hs files)
On Fri, May 16, 2014 at 3:42 PM, Mateusz Kowalczyk fuuze...@fuuzetsu.co.ukwrote: It does not matter I feel because you're encouraged to detab in a separate patch anyway so blaming will show that whether it's all done at once or separately. It's indeed a minor reason. I think the thinking is that if you're changing a file any way you 1) will touch a bunch of the same lines for other reasons than detabbing and 2) you know something about the code so blaming you is less bad. :) ___ ghc-devs mailing list ghc-devs@haskell.org http://www.haskell.org/mailman/listinfo/ghc-devs
NondecreasingIndentation ( de-tabbing several .hs files)
Hello GHC devs, 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? Moreover, I touched several files (over 300) while refactoring, would that qualify as working on this module in the sense of | While working on this module you are encouraged to remove it and detab | the module (please do the detabbing in a separate patch). or would that overreach wrt the original intent of the guideline quoted above? Cheers, hvr ___ ghc-devs mailing list ghc-devs@haskell.org http://www.haskell.org/mailman/listinfo/ghc-devs