Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Export list indentation #3

Open
superbobry opened this issue Aug 19, 2013 · 2 comments
Open

Export list indentation #3

superbobry opened this issue Aug 19, 2013 · 2 comments

Comments

@superbobry
Copy link

According to haskell-style-guide, export list should be indented with 4 spaces:

module Graphics.Shape
    ( Shape(..)
    , SomeShape(..)
    , triangle
    ) where

The current implementation indents it as:

module Graphics.Shape
       ( Shape(..)
       , SomeShape(..)
       , sphere
       , triangle
       ) where

I guess the solution is to add a configurable variable for export list offset.

@errge
Copy link
Member

errge commented Aug 19, 2013

Well, I disagree with the haskell-style-guide here.

First, 4 seems to be very inconsistent, it'd be easier to agree to 2, because we use 2 everywhere else too.

Second, indenting to the module name seems acceptable in this case, because it will always be indented by the length of "module " and not more. But this second reason seems to be invalidated by the behavior in this case:

module Graphics.Shape (
  Shape(..),
  triangle) where

So we're indenting to 2 here, so maybe we should indent to 2 in the other case too.

Let's see how it goes while fixing this, if it's easy to add a variable to have it at 4, I will add it.

@hvr
Copy link

hvr commented Aug 23, 2013

First, 4 seems to be very inconsistent, it'd be easier to agree to 2, because we use 2 everywhere else too.

I don't understand this one; the style guide actually tries hard to use 4 chars indentations almost everywhere except for where clauses, which use an "odd" 2-char as a visual cue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants