on master help sign in
Merge pull request #545 from bos/hlint
d5f41b6Adam Bergmark
Data/Aeson/Encoding/Builder.hs−1
@@ -1,6 +1,5 @@
1{-# LANGUAGE BangPatterns #-}
1{-# LANGUAGE BangPatterns #-}
2{-# LANGUAGE CPP #-}
2{-# LANGUAGE CPP #-}
3−{-# LANGUAGE OverloadedStrings #-}
4
3
5-- |
4-- |
6-- Module: Data.Aeson.Encoding.Builder
5-- Module: Data.Aeson.Encoding.Builder
Data/Aeson/Parser.hs−2
@@ -1,5 +1,3 @@
1−{-# LANGUAGE OverloadedStrings #-}
2−
3-- |
1-- |
4-- Module: Data.Aeson.Parser
2-- Module: Data.Aeson.Parser
5-- Copyright: (c) 2012-2016 Bryan O'Sullivan
3-- 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
1539 FromJSONKeyTextParser f -> withObject "Map k v" $
1539 FromJSONKeyTextParser f -> withObject "Map k v" $
1540 H.foldrWithKey (\k v m -> M.insert <$> f k <?> Key k <*> p v <?> Key k <*> m) (pure M.empty)
1540 H.foldrWithKey (\k v m -> M.insert <$> f k <?> Key k <*> p v <?> Key k <*> m) (pure M.empty)
1541 FromJSONKeyValue f -> withArray "Map k v" $ \arr ->
1541 FromJSONKeyValue f -> withArray "Map k v" $ \arr ->
1542− M.fromList <$> (Tr.sequence .
1542+ fmap M.fromList . Tr.sequence .
1543− zipWith (parseIndexedJSONPair f p) [0..] . V.toList $ arr)
1543+ zipWith (parseIndexedJSONPair f p) [0..] . V.toList $ arr
1544 {-# INLINE liftParseJSON #-}
1544 {-# INLINE liftParseJSON #-}
1545
1545
1546instance (FromJSONKey k, Ord k, FromJSON v) => FromJSON (M.Map k v) where
1546instance (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
1619 FromJSONKeyTextParser f -> withObject "HashMap k v" $
1619 FromJSONKeyTextParser f -> withObject "HashMap k v" $
1620 H.foldrWithKey (\k v m -> H.insert <$> f k <?> Key k <*> p v <?> Key k <*> m) (pure H.empty)
1620 H.foldrWithKey (\k v m -> H.insert <$> f k <?> Key k <*> p v <?> Key k <*> m) (pure H.empty)
1621 FromJSONKeyValue f -> withArray "Map k v" $ \arr ->
1621 FromJSONKeyValue f -> withArray "Map k v" $ \arr ->
1622− H.fromList <$> (Tr.sequence .
1622+ fmap H.fromList . Tr.sequence .
1623− zipWith (parseIndexedJSONPair f p) [0..] . V.toList $ arr)
1623+ zipWith (parseIndexedJSONPair f p) [0..] . V.toList $ arr
1624 where
1624 where
1625 uc :: Parser (H.HashMap Text v) -> Parser (H.HashMap k v)
1625 uc :: Parser (H.HashMap Text v) -> Parser (H.HashMap k v)
1626 uc = unsafeCoerce
1626 uc = unsafeCoerce
Makefile+1−1
@@ -1,2 +1,2 @@
1lint:
1lint:
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
2
2
3import Prelude ()
3import Prelude ()
4import Prelude.Compat
4import Prelude.Compat
tests/DataFamilies/Encoders.hs+1−1
@@ -2,7 +2,7 @@
2{-# LANGUAGE GADTs #-}
2{-# LANGUAGE GADTs #-}
3{-# LANGUAGE TemplateHaskell #-}
3{-# LANGUAGE TemplateHaskell #-}
4
4
5−module DataFamilies.Encoders where
5+module DataFamilies.Encoders (module DataFamilies.Encoders) where
6
6
7import Prelude ()
7import Prelude ()
8import Prelude.Compat
8import Prelude.Compat
tests/DataFamilies/Types.hs+1−1
@@ -8,7 +8,7 @@
8{-# LANGUAGE TemplateHaskell #-}
8{-# LANGUAGE TemplateHaskell #-}
9{-# LANGUAGE TypeFamilies #-}
9{-# LANGUAGE TypeFamilies #-}
10
10
11−module DataFamilies.Types where
11+module DataFamilies.Types (module DataFamilies.Types) where
12
12
13import Prelude ()
13import Prelude ()
14import Prelude.Compat
14import Prelude.Compat
tests/Encoders.hs+1−1
@@ -2,7 +2,7 @@
2{-# LANGUAGE GADTs #-}
2{-# LANGUAGE GADTs #-}
3{-# LANGUAGE TemplateHaskell #-}
3{-# LANGUAGE TemplateHaskell #-}
4
4
5−module Encoders where
5+module Encoders (module Encoders) where
6
6
7import Prelude ()
7import Prelude ()
8import Prelude.Compat
8import Prelude.Compat
tests/JSONTestSuite/parsers/test_haskell-aeson/src/Main.hs+1−1
@@ -1,6 +1,6 @@
1{-# LANGUAGE ScopedTypeVariables #-}
1{-# LANGUAGE ScopedTypeVariables #-}
2
2
3−module Main where
3+module Main (main) where
4
4
5import qualified Data.Aeson as Aeson
5import qualified Data.Aeson as Aeson
6import qualified Data.ByteString as Bytes
6import qualified Data.ByteString as Bytes
tests/Options.hs+1−1
@@ -1,4 +1,4 @@
1−module Options where
1+module Options (module Options) where
2
2
3import Prelude ()
3import Prelude ()
4import Prelude.Compat
4import Prelude.Compat
tests/Properties.hs+1−1
@@ -4,7 +4,7 @@
4{-# LANGUAGE RankNTypes #-}
4{-# LANGUAGE RankNTypes #-}
5{-# LANGUAGE ScopedTypeVariables #-}
5{-# LANGUAGE ScopedTypeVariables #-}
6
6
7−module Properties where
7+module Properties (module Properties) where
8
8
9import Prelude ()
9import Prelude ()
10import Prelude.Compat
10import Prelude.Compat
tests/Types.hs+1−1
@@ -7,7 +7,7 @@
7{-# LANGUAGE StandaloneDeriving #-}
7{-# LANGUAGE StandaloneDeriving #-}
8{-# LANGUAGE ScopedTypeVariables #-}
8{-# LANGUAGE ScopedTypeVariables #-}
9
9
10−module Types where
10+module Types (module Types) where
11
11
12import Prelude ()
12import Prelude ()
13import Prelude.Compat
13import Prelude.Compat
travis/script.sh+1−1
@@ -21,7 +21,7 @@ case $BUILD in
21 ;;
21 ;;
22 hlint)
22 hlint)
23 stack build --fast aeson --stack-yaml stack-lts8.yaml --system-ghc --no-terminal
23 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
25 make lint
25 make lint
26 ;;
26 ;;
27esac
27esac