diff options
author | Jasper Van der Jeugt <m@jaspervdj.be> | 2012-06-08 17:12:06 +0200 |
---|---|---|
committer | Jasper Van der Jeugt <m@jaspervdj.be> | 2012-06-08 17:12:36 +0200 |
commit | 2204fdd63aa79b9a75a080dfb19990838444d029 (patch) | |
tree | 5305a1b7fb5897a7ec91610edba6816b7fd78876 | |
parent | 013695a0c1f71a5e86d71289130fecbed6d42dac (diff) | |
download | stylish-haskell-0.2.0.2.tar.gz |
Case-insensitive import sorting0.2.0.2
Closes #6
-rw-r--r-- | src/StylishHaskell/Step/Imports.hs | 4 | ||||
-rw-r--r-- | stylish-haskell.cabal | 2 |
2 files changed, 3 insertions, 3 deletions
diff --git a/src/StylishHaskell/Step/Imports.hs b/src/StylishHaskell/Step/Imports.hs index fc77c55..bbea76d 100644 --- a/src/StylishHaskell/Step/Imports.hs +++ b/src/StylishHaskell/Step/Imports.hs @@ -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) @@ -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) -------------------------------------------------------------------------------- diff --git a/stylish-haskell.cabal b/stylish-haskell.cabal index 6f9744e..724ed28 100644 --- a/stylish-haskell.cabal +++ b/stylish-haskell.cabal @@ -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 |