fix ghc 7.10 Applicative import warnings (#239)

Still needed CPP, despite using base-compat.
This commit is contained in:
Simon Michael 2015-03-29 15:39:37 -07:00
parent 592d997438
commit f75849cdd6
10 changed files with 33 additions and 8 deletions

View File

@ -1,4 +1,5 @@
#!/usr/bin/env runhaskell #!/usr/bin/env runhaskell
{-# LANGUAGE CPP #-}
{-| {-|
hledger-rewrite [PATTERNS] --add-posting "ACCT AMTEXPR" ... hledger-rewrite [PATTERNS] --add-posting "ACCT AMTEXPR" ...
@ -22,7 +23,9 @@ Tested-with: hledger HEAD ~ 2014/2/4
-- hledger lib, cli and cmdargs utils -- hledger lib, cli and cmdargs utils
import Hledger.Cli import Hledger.Cli
-- more utils for parsing -- more utils for parsing
import Control.Applicative ((<*)) hiding (many) #if !MIN_VERSION_base(4,8,0)
import Control.Applicative.Compat ((<*))
#endif
import Text.Parsec import Text.Parsec

View File

@ -64,7 +64,9 @@ module Hledger.Data.Dates (
) )
where where
import Control.Applicative ((<*)) #if !MIN_VERSION_base(4,8,0)
import Control.Applicative.Compat ((<*))
#endif
import Control.Monad import Control.Monad
import Data.List import Data.List
import Data.Maybe import Data.Maybe

View File

@ -1,4 +1,5 @@
{-# LANGUAGE FlexibleContexts #-} {-# LANGUAGE FlexibleContexts #-}
{-# LANGUAGE CPP #-}
module Hledger.Data.OutputFormat ( module Hledger.Data.OutputFormat (
parseStringFormat parseStringFormat
, formatsp , formatsp
@ -8,8 +9,10 @@ module Hledger.Data.OutputFormat (
, tests , tests
) where ) where
import Control.Applicative ((<*))
import Numeric import Numeric
#if !MIN_VERSION_base(4,8,0)
import Control.Applicative.Compat ((<*))
#endif
import Data.Char (isPrint) import Data.Char (isPrint)
import Data.Maybe import Data.Maybe
import Test.HUnit import Test.HUnit

View File

@ -20,7 +20,9 @@ module Hledger.Read.CsvReader (
tests_Hledger_Read_CsvReader tests_Hledger_Read_CsvReader
) )
where where
import Control.Applicative ((<$>), (<*)) #if !MIN_VERSION_base(4,8,0)
import Control.Applicative.Compat ((<$>), (<*))
#endif
import Control.Exception hiding (try) import Control.Exception hiding (try)
import Control.Monad import Control.Monad
import Control.Monad.Except import Control.Monad.Except

View File

@ -45,7 +45,9 @@ module Hledger.Read.JournalReader (
#endif #endif
) )
where where
import Control.Applicative ((<*)) #if !MIN_VERSION_base(4,8,0)
import Control.Applicative.Compat ((<*))
#endif
import qualified Control.Exception as C import qualified Control.Exception as C
import Control.Monad import Control.Monad
import Control.Monad.Except import Control.Monad.Except

View File

@ -89,6 +89,7 @@ library
Hledger.Utils.UTF8IOCompat Hledger.Utils.UTF8IOCompat
build-depends: build-depends:
base >= 4.3 && < 5 base >= 4.3 && < 5
,base-compat >= 0.5.0
,array ,array
,blaze-markup >= 0.5.1 ,blaze-markup >= 0.5.1
,bytestring ,bytestring
@ -127,6 +128,7 @@ test-suite tests
default-language: Haskell2010 default-language: Haskell2010
build-depends: hledger-lib build-depends: hledger-lib
, base >= 4.3 && < 5 , base >= 4.3 && < 5
, base-compat >= 0.5.0
, array , array
, blaze-markup >= 0.5.1 , blaze-markup >= 0.5.1
, cmdargs , cmdargs

View File

@ -162,6 +162,7 @@ library
hledger == 0.24.98 hledger == 0.24.98
, hledger-lib == 0.24.98 , hledger-lib == 0.24.98
, base >= 4 && < 5 , base >= 4 && < 5
, base-compat >= 0.5.0
, blaze-html , blaze-html
, blaze-markup , blaze-markup
, bytestring , bytestring
@ -236,6 +237,7 @@ executable hledger-web
, hledger == 0.24.98 , hledger == 0.24.98
, hledger-web == 0.24.98 , hledger-web == 0.24.98
, base >= 4 && < 5 , base >= 4 && < 5
, base-compat >= 0.5.0
, blaze-html , blaze-html
, blaze-markup , blaze-markup
, bytestring , bytestring
@ -285,6 +287,7 @@ test-suite test
build-depends: build-depends:
hledger-web == 0.24.98 hledger-web == 0.24.98
, base , base
, base-compat >= 0.5.0
, hspec , hspec
, yesod , yesod
, yesod-test , yesod-test

View File

@ -3,12 +3,14 @@ A history-aware add command to help with data entry.
|-} |-}
{-# OPTIONS_GHC -fno-warn-missing-signatures -fno-warn-unused-do-bind #-} {-# OPTIONS_GHC -fno-warn-missing-signatures -fno-warn-unused-do-bind #-}
{-# LANGUAGE ScopedTypeVariables, DeriveDataTypeable, RecordWildCards, TypeOperators, FlexibleContexts #-} {-# LANGUAGE CPP, ScopedTypeVariables, DeriveDataTypeable, RecordWildCards, TypeOperators, FlexibleContexts #-}
module Hledger.Cli.Add module Hledger.Cli.Add
where where
import Control.Applicative ((<*)) #if !MIN_VERSION_base(4,8,0)
import Control.Applicative.Compat ((<*))
#endif
import Control.Exception as E import Control.Exception as E
import Control.Monad import Control.Monad
import Control.Monad.Trans (liftIO) import Control.Monad.Trans (liftIO)

View File

@ -59,7 +59,9 @@ module Hledger.Cli.Options (
) )
where where
import Control.Applicative ((<$>), (<*)) #if !MIN_VERSION_base(4,8,0)
import Control.Applicative.Compat ((<$>), (<*))
#endif
import qualified Control.Exception as C import qualified Control.Exception as C
import Control.Monad (when) import Control.Monad (when)
import Data.List import Data.List

View File

@ -77,6 +77,7 @@ library
build-depends: build-depends:
hledger-lib == 0.24.98 hledger-lib == 0.24.98
,base >= 4.3 && < 5 ,base >= 4.3 && < 5
,base-compat >= 0.5.0
-- ,cabal-file-th -- ,cabal-file-th
,containers ,containers
,cmdargs >= 0.10 && < 0.11 ,cmdargs >= 0.10 && < 0.11
@ -132,6 +133,7 @@ executable hledger
hledger-lib == 0.24.98 hledger-lib == 0.24.98
,hledger == 0.24.98 ,hledger == 0.24.98
,base >= 4.3 && < 5 ,base >= 4.3 && < 5
,base-compat >= 0.5.0
,containers ,containers
,cmdargs >= 0.10 && < 0.11 ,cmdargs >= 0.10 && < 0.11
,csv ,csv
@ -174,6 +176,7 @@ test-suite tests
build-depends: hledger-lib build-depends: hledger-lib
, hledger , hledger
, base >= 4.3 && < 5 , base >= 4.3 && < 5
, base-compat >= 0.5.0
, cmdargs , cmdargs
, containers , containers
, csv , csv
@ -218,6 +221,7 @@ benchmark bench
build-depends: hledger-lib, build-depends: hledger-lib,
hledger, hledger,
base >= 4.3 && < 5, base >= 4.3 && < 5,
base-compat >= 0.5.0,
html, html,
tabular >= 0.2 && < 0.3, tabular >= 0.2 && < 0.3,
process, process,