Treatment of long import lists #7

Closed
dag opened this Issue Jun 8, 2012 · 5 comments

Comments

Projects
None yet
3 participants

dag commented Jun 8, 2012

If I have

import Happstack.Server              (Happstack, Response, neverExpires, setHeaderM, badRequest, ok, toResponse, guessContentTypeM, mimeTypes, lookPairs)

stylish-haskell will produce

import Happstack.Server              (Happstack, Response, badRequest, guessContentTypeM, lookPairs,
 mimeTypes, neverExpires, ok, setHeaderM, toResponse)

My preference would be to either keep the import list on one line, or line up wrapped lines with the parenthesis:

import Happstack.Server              (Happstack, Response, badRequest, guessContentTypeM, lookPairs
                                     ,mimeTypes, neverExpires, ok, setHeaderM, toResponse)
Contributor

sopvop commented Jul 27, 2012

Also, it would be nice if it wraps imported names if line is to long. Some of us prefer to keep it down to 80 chars :)

Owner

jaspervdj commented Jul 31, 2012

@dag Could you check if the behavior on the master branch is ok for you? It turns

import Happstack.Server              (Happstack, Response, neverExpires, setHeaderM, badRequest, ok, toResponse, guessContentTypeM, mimeTypes, lookPairs)

into

import           Happstack.Server (Happstack, Response, badRequest,
                                  guessContentTypeM, lookPairs, mimeTypes,
                                  neverExpires, ok, setHeaderM, toResponse)

dag commented Jul 31, 2012

I'd prefer to align after the start-parenthesis rather than with it.

import Happstack.Server (Happstack, Response, badRequest,
                         guessContentTypeM, lookPairs, mimeTypes,
                         neverExpires, ok, setHeaderM, toResponse)
Owner

jaspervdj commented Jul 31, 2012

Okay, I don't really have a preference myself here so I changed it.

Owner

jaspervdj commented Aug 9, 2012

Closing

jaspervdj closed this Aug 9, 2012

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment