on master help sign in
HLint: Use the cabal_macros.h generated from stack/lts-8
commite6db31e5ae714b09e194f3930d9f7ecc7363283b authorAdam Bergmark <adam@bergmark.nl> dateMon 20 Mar 2017, 00:29 (10 years ago) parentcbec132
5 files changed+10−6
.travis.yml+3−3 Data/Aeson/Internal/Time.hs+3−2 Data/Aeson/Parser/Internal.hs+2 Makefile+1−1 travis/script.sh+1
.travis.yml+3−3
@@ -19,6 +19,9 @@ before_cache:
1919
2020matrix:
2121 include:
22+ - env: BUILD=hlint CABALVER=1.24 GHCVER=8.0.2
23+ compiler: ": #GHC 8.0.2"
24+ addons: {apt: {packages: [cabal-install-1.24,ghc-8.0.2], sources: [hvr-ghc]}}
2225 - env: BUILD=stack CABALVER=1.24 GHCVER=8.0.2 STACK_YAML=stack-bench.yaml
2326 compiler: ": #GHC 8.0.2"
2427 addons: {apt: {packages: [cabal-install-1.24,ghc-8.0.2], sources: [hvr-ghc]}}
@@ -40,9 +43,6 @@ matrix:
4043 - env: BUILD=cabal CABALVER=1.22 GHCVER=7.10.3
4144 compiler: ": #GHC 7.10.3"
4245 addons: {apt: {packages: [cabal-install-1.22,ghc-7.10.3], sources: [hvr-ghc]}}
43− - env: BUILD=hlint CABALVER=1.24 GHCVER=8.0.2
44− compiler: ": #GHC 8.0.2"
45− addons: {apt: {packages: [cabal-install-1.24,ghc-8.0.2], sources: [hvr-ghc]}}
4646
4747before_install:
4848 - unset CC
Data/Aeson/Internal/Time.hs+3−2
@@ -20,14 +20,13 @@ module Data.Aeson.Internal.Time
2020import Prelude ()
2121import Prelude.Compat
2222
23−import Data.Fixed (Pico)
2423import Data.Int (Int64)
2524import Data.Time
2625import Unsafe.Coerce (unsafeCoerce)
2726
2827#if MIN_VERSION_base(4,7,0)
2928
30−import Data.Fixed (Fixed(MkFixed))
29+import Data.Fixed (Pico, Fixed(MkFixed))
3130
3231toPico :: Integer -> Pico
3332toPico = MkFixed
@@ -37,6 +36,8 @@ fromPico (MkFixed i) = i
3736
3837#else
3938
39+import Data.Fixed (Pico)
40+
4041toPico :: Integer -> Pico
4142toPico = unsafeCoerce
4243
Data/Aeson/Parser/Internal.hs+2
@@ -221,6 +221,8 @@ jstring_ = {-# SCC "jstring_" #-} do
221221 in Just (S a')
222222
223223data S = S Int#
224+-- This hint will no longer trigger once hlint > 1.9.41 is released.
225+{-# ANN S ("HLint: ignore Use newtype instead of data" :: String) #-}
224226#else
225227 startState = False
226228 go a c
Makefile+1−1
@@ -1,2 +1,2 @@
11lint:
2− hlint --cpp-include include/ .
2+ hlint --cpp-include include/ --cpp-file .stack-work/dist/*/*Cabal-*/build/autogen/cabal_macros.h .
travis/script.sh+1
@@ -20,6 +20,7 @@ case $BUILD in
2020 (cd dist && cabal install --force-reinstalls "$SRC_TGZ")
2121 ;;
2222 hlint)
23+ stack build --fast aeson --stack-yaml stack-lts8.yaml --system-ghc --no-terminal
2324 stack install hlint --resolver lts-8 --system-ghc --no-terminal
2425 make lint
2526 ;;