Skip to content

Commit

Permalink
Case-insensitive import sorting
Browse files Browse the repository at this point in the history
Closes #6
  • Loading branch information
jaspervdj committed Jun 8, 2012
1 parent 013695a commit 2204fdd
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions src/StylishHaskell/Step/Imports.hs
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ module StylishHaskell.Step.Imports

--------------------------------------------------------------------------------
import Control.Arrow ((&&&))
import Data.Char (isAlpha)
import Data.Char (isAlpha, toLower)
import Data.List (sortBy)
import Data.Maybe (isJust, maybeToList)
import Data.Ord (comparing)
Expand Down Expand Up @@ -62,7 +62,7 @@ groupAdjacent = foldr go []
--------------------------------------------------------------------------------
-- | Compare imports for ordering
compareImports :: H.ImportDecl l -> H.ImportDecl l -> Ordering
compareImports = comparing (importName &&& H.importQualified)
compareImports = comparing (map toLower . importName &&& H.importQualified)


--------------------------------------------------------------------------------
Expand Down
2 changes: 1 addition & 1 deletion stylish-haskell.cabal
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
Name: stylish-haskell
Version: 0.2.0.1
Version: 0.2.0.2
Synopsis: Haskell code prettifier
Homepage: https://github.com/jaspervdj/stylish-haskell
License: BSD3
Expand Down

0 comments on commit 2204fdd

Please sign in to comment.