on master help sign in
Merge pull request #545 from bos/hlint

Upgrade to hlint 2.0.5

commitd5f41b69d1eab055b246d860b45c0f3b51a0590c authorAdam Bergmark <adam@bergmark.nl> dateMon 1 May 2017, 21:57 (9 years ago) parent1cf3edc0d742ec
13 files changed+14−17
Data/Aeson/Encoding/Builder.hs−1 Data/Aeson/Parser.hs−2 Data/Aeson/Types/FromJSON.hs+4−4 Makefile+1−1 benchmarks/Options.hs+1−1 tests/DataFamilies/Encoders.hs+1−1 tests/DataFamilies/Types.hs+1−1 tests/Encoders.hs+1−1 tests/JSONTestSuite/parsers/test_haskell-aeson/src/Main.hs+1−1 tests/Options.hs+1−1 tests/Properties.hs+1−1 tests/Types.hs+1−1 travis/script.sh+1−1
Data/Aeson/Encoding/Builder.hs−1
@@ -1,6 +1,5 @@
11{-# LANGUAGE BangPatterns #-}
22{-# LANGUAGE CPP #-}
3−{-# LANGUAGE OverloadedStrings #-}
43
54-- |
65-- Module: Data.Aeson.Encoding.Builder
Data/Aeson/Parser.hs−2
@@ -1,5 +1,3 @@
1−{-# LANGUAGE OverloadedStrings #-}
2−
31-- |
42-- Module: Data.Aeson.Parser
53-- Copyright: (c) 2012-2016 Bryan O'Sullivan
Data/Aeson/Types/FromJSON.hs+4−4
@@ -1539,8 +1539,8 @@ instance (FromJSONKey k, Ord k) => FromJSON1 (M.Map k) where
15391539 FromJSONKeyTextParser f -> withObject "Map k v" $
15401540 H.foldrWithKey (\k v m -> M.insert <$> f k <?> Key k <*> p v <?> Key k <*> m) (pure M.empty)
15411541 FromJSONKeyValue f -> withArray "Map k v" $ \arr ->
1542− M.fromList <$> (Tr.sequence .
1543− zipWith (parseIndexedJSONPair f p) [0..] . V.toList $ arr)
1542+ fmap M.fromList . Tr.sequence .
1543+ zipWith (parseIndexedJSONPair f p) [0..] . V.toList $ arr
15441544 {-# INLINE liftParseJSON #-}
15451545
15461546instance (FromJSONKey k, Ord k, FromJSON v) => FromJSON (M.Map k v) where
@@ -1619,8 +1619,8 @@ instance (FromJSONKey k, Eq k, Hashable k) => FromJSON1 (H.HashMap k) where
16191619 FromJSONKeyTextParser f -> withObject "HashMap k v" $
16201620 H.foldrWithKey (\k v m -> H.insert <$> f k <?> Key k <*> p v <?> Key k <*> m) (pure H.empty)
16211621 FromJSONKeyValue f -> withArray "Map k v" $ \arr ->
1622− H.fromList <$> (Tr.sequence .
1623− zipWith (parseIndexedJSONPair f p) [0..] . V.toList $ arr)
1622+ fmap H.fromList . Tr.sequence .
1623+ zipWith (parseIndexedJSONPair f p) [0..] . V.toList $ arr
16241624 where
16251625 uc :: Parser (H.HashMap Text v) -> Parser (H.HashMap k v)
16261626 uc = unsafeCoerce
Makefile+1−1
@@ -1,2 +1,2 @@
11lint:
2− hlint --cpp-include include/ --cpp-file .stack-work/dist/*/*Cabal-*/build/autogen/cabal_macros.h .
2+ hlint --cpp-include include/ --cpp-file .stack-work/dist/*/*Cabal-*/build/autogen/cabal_macros.h Data/ attoparsec-iso8601/ benchmarks/ examples/ ffi/ pure/ tests/
benchmarks/Options.hs+1−1
@@ -1,4 +1,4 @@
1−module Options where
1+module Options (opts) where
22
33import Prelude ()
44import Prelude.Compat
tests/DataFamilies/Encoders.hs+1−1
@@ -2,7 +2,7 @@
22{-# LANGUAGE GADTs #-}
33{-# LANGUAGE TemplateHaskell #-}
44
5−module DataFamilies.Encoders where
5+module DataFamilies.Encoders (module DataFamilies.Encoders) where
66
77import Prelude ()
88import Prelude.Compat
tests/DataFamilies/Types.hs+1−1
@@ -8,7 +8,7 @@
88{-# LANGUAGE TemplateHaskell #-}
99{-# LANGUAGE TypeFamilies #-}
1010
11−module DataFamilies.Types where
11+module DataFamilies.Types (module DataFamilies.Types) where
1212
1313import Prelude ()
1414import Prelude.Compat
tests/Encoders.hs+1−1
@@ -2,7 +2,7 @@
22{-# LANGUAGE GADTs #-}
33{-# LANGUAGE TemplateHaskell #-}
44
5−module Encoders where
5+module Encoders (module Encoders) where
66
77import Prelude ()
88import Prelude.Compat
tests/JSONTestSuite/parsers/test_haskell-aeson/src/Main.hs+1−1
@@ -1,6 +1,6 @@
11{-# LANGUAGE ScopedTypeVariables #-}
22
3−module Main where
3+module Main (main) where
44
55import qualified Data.Aeson as Aeson
66import qualified Data.ByteString as Bytes
tests/Options.hs+1−1
@@ -1,4 +1,4 @@
1−module Options where
1+module Options (module Options) where
22
33import Prelude ()
44import Prelude.Compat
tests/Properties.hs+1−1
@@ -4,7 +4,7 @@
44{-# LANGUAGE RankNTypes #-}
55{-# LANGUAGE ScopedTypeVariables #-}
66
7−module Properties where
7+module Properties (module Properties) where
88
99import Prelude ()
1010import Prelude.Compat
tests/Types.hs+1−1
@@ -7,7 +7,7 @@
77{-# LANGUAGE StandaloneDeriving #-}
88{-# LANGUAGE ScopedTypeVariables #-}
99
10−module Types where
10+module Types (module Types) where
1111
1212import Prelude ()
1313import Prelude.Compat
travis/script.sh+1−1
@@ -21,7 +21,7 @@ case $BUILD in
2121 ;;
2222 hlint)
2323 stack build --fast aeson --stack-yaml stack-lts8.yaml --system-ghc --no-terminal
24− stack install hlint --resolver lts-8 --system-ghc --no-terminal
24+ stack install hlint-2.0.5 --stack-yaml stack-lts8.yaml --system-ghc --no-terminal
2525 make lint
2626 ;;
2727esac