haskell-style-guide icon indicating copy to clipboard operation
haskell-style-guide copied to clipboard

In export lists, why indent "section" comments further?

Open jubobs opened this issue 9 years ago • 0 comments

For export lists, you recommend indenting commented "section" lines two spaces further than the opening and closing braces and commas:

Format export lists as follows:

module Data.Set
    (
      -- * The @Set@ type
      Set
    , empty
    , singleton

      -- * Querying
    , member
    ) where

However, you don't seem to follow this recommendation in your own packages (cassava, unordered-containers etc.).

Is this recommendation intentional? If so, are there real benefits to it? Why not simply start the comment in the same column as braces and commas? Like so:

module Data.Set
    (
    -- * The @Set@ type
      Set
    , empty
    , singleton

    -- * Querying
    , member
    ) where

jubobs avatar Aug 26 '15 19:08 jubobs