stylish-haskell 0.9.0.2 → 0.9.1.0
raw patch · 4 files changed
+24/−6 lines, 4 filesdep +semigroupsdep ~aesonPVP ok
version bump matches the API change (PVP)
Dependencies added: semigroups
Dependency ranges changed: aeson
API changes (from Hackage documentation)
+ Language.Haskell.Stylish.Step.Imports: instance GHC.Classes.Ord l => Data.Semigroup.Semigroup (Language.Haskell.Stylish.Step.Imports.ImportPortion l)
Files
- CHANGELOG +5/−0
- README.markdown +9/−0
- lib/Language/Haskell/Stylish/Step/Imports.hs +6/−3
- stylish-haskell.cabal +4/−3
CHANGELOG view
@@ -1,5 +1,10 @@ # CHANGELOG +- 0.9.1.0 (2018-04-26)+ * Support GHC 8.4.1 by adding instance SemiGroup ImportPortion (by George+ Wilson)+ * Bump `aeson` to 1.3+ - 0.9.0.2 (2018-01-03) * Bump lower bound of `directory` to `1.2.3` for `getXdgDirectory`
README.markdown view
@@ -149,6 +149,15 @@ [ide-haskell]: https://atom.io/packages/ide-haskell [atom-beautify]: Https://atom.io/packages/atom-beautify +Using with Continuous Integration+---------------------------------++You can quickly grab the latest binary and run `stylish-haskell` like so:++ curl -sL https://raw.github.com/jaspervdj/stylish-haskell/master/scripts/latest.sh | sh -s .++Where the `.` can be replaced with the arguments you pass to `stylish-haskell`.+ Credits -------
lib/Language/Haskell/Stylish/Step/Imports.hs view
@@ -22,9 +22,9 @@ import Data.List (intercalate, sortBy) import qualified Data.Map as M import Data.Maybe (isJust, maybeToList)-import Data.Monoid ((<>)) import Data.Ord (comparing) import qualified Data.Set as S+import Data.Semigroup (Semigroup ((<>))) import qualified Language.Haskell.Exts as H @@ -168,10 +168,13 @@ = ImportSome [H.CName l] -- ^ @A(x, y, z)@ | ImportAll -- ^ @A(..)@ +instance Ord l => Semigroup (ImportPortion l) where+ ImportSome a <> ImportSome b = ImportSome (setUnion a b)+ _ <> _ = ImportAll+ instance Ord l => Monoid (ImportPortion l) where mempty = ImportSome []- mappend (ImportSome a) (ImportSome b) = ImportSome (setUnion a b)- mappend _ _ = ImportAll+ mappend = (<>) -- | O(n log n) union. setUnion :: Ord a => [a] -> [a] -> [a]
stylish-haskell.cabal view
@@ -1,5 +1,5 @@ Name: stylish-haskell-Version: 0.9.0.2+Version: 0.9.1.0 Synopsis: Haskell code prettifier Homepage: https://github.com/jaspervdj/stylish-haskell License: BSD3@@ -48,7 +48,7 @@ Paths_stylish_haskell Build-depends:- aeson >= 0.6 && < 1.3,+ aeson >= 0.6 && < 1.4, base >= 4.8 && < 5, bytestring >= 0.9 && < 0.11, containers >= 0.3 && < 0.6,@@ -57,6 +57,7 @@ file-embed >= 0.0.10 && < 0.1, haskell-src-exts >= 1.18 && < 1.21, mtl >= 2.0 && < 2.3,+ semigroups >= 0.18 && < 0.19, syb >= 0.3 && < 0.8, yaml >= 0.7 && < 0.9 @@ -70,7 +71,7 @@ strict >= 0.3 && < 0.4, optparse-applicative >= 0.12 && < 0.15, -- Copied from regular dependencies...- aeson >= 0.6 && < 1.3,+ aeson >= 0.6 && < 1.4, base >= 4.8 && < 5, bytestring >= 0.9 && < 0.11, containers >= 0.3 && < 0.6,