on master help sign in
Merge pull request #3921 from geigerzaehler/remove-old-ghc

Drop support for GHC <= 7.8.4, Cabal <= 1.20

commit250eb73714f25f1acdab8d6621a2ab5f2881c8fb authorNiklas Larsson <metaniklas@gmail.com> dateSun 23 Jul 2017, 20:22 (9 years ago) parent0f8b4ca040735d
8 files changed+2−46
.travis.yml−6 Setup.hs+1−16 idris.cabal+1−1 src/Idris/CmdOptions.hs−2 src/Idris/Package/Parser.hs−7 src/Idris/Parser/Helpers.hs−7 src/Idris/Reflection.hs−5 test/TestRun.hs−2
.travis.yml−6
@@ -14,12 +14,6 @@ matrix:
1414 - os: osx
1515 env: CABALVER="1.24" GHCVER="8.0.1" TESTS="test_c"
1616 compiler: ": #GHC 8.0.1"
17− - env: CABALVER="1.20" GHCVER="7.6.3" TESTS="test_c"
18− compiler: ": #GHC 7.6.3"
19− addons: {apt: {packages: [cabal-install-1.20,ghc-7.6.3,cppcheck,hscolour], sources: [hvr-ghc]}}
20− - env: CABALVER="1.20" GHCVER="7.8.4" TESTS="test_c"
21− compiler: ": #GHC 7.8.4"
22− addons: {apt: {packages: [cabal-install-1.20,ghc-7.8.4,cppcheck,hscolour], sources: [hvr-ghc]}}
2317 - env: CABALVER="1.22" GHCVER="7.10.3" TESTS="lib_doc doc"
2418 compiler: ": #GHC 7.10.3"
2519 addons: {apt: {packages: [cabal-install-1.22,ghc-7.10.3,cppcheck,hscolour], sources: [hvr-ghc]}}
Setup.hs+1−16
@@ -274,26 +274,15 @@ idrisInstall verbosity copy pkg local = unless (execOnly (configFlags local)) $
274274-- -----------------------------------------------------------------------------
275275-- Test
276276
277−-- FIXME: We use the __GLASGOW_HASKELL__ macro because MIN_VERSION_cabal seems
278−-- to be broken !
279−
280277-- There are two "dataDir" in cabal, and they don't relate to each other.
281278-- When fetching modules, idris uses the second path (in the pkg record),
282279-- which by default is the root folder of the project.
283280-- We want it to be the install directory where we put the idris libraries.
284281fixPkg pkg target = pkg { dataDir = target }
285282
286−-- The "Args" argument of the testHooks has been added in cabal 1.22.0,
287−-- and should therefore be ignored for prior versions.
288−#if __GLASGOW_HASKELL__ < 710
289−originalTestHook _ = testHook simpleUserHooks
290−#else
291−originalTestHook = testHook simpleUserHooks
292−#endif
293−
294283idrisTestHook args pkg local hooks flags = do
295284 let target = datadir $ L.absoluteInstallDirs pkg local NoCopyDest
296− originalTestHook args (fixPkg pkg target) local hooks flags
285+ testHook simpleUserHooks args (fixPkg pkg target) local hooks flags
297286
298287-- -----------------------------------------------------------------------------
299288-- Main
@@ -314,9 +303,5 @@ main = defaultMainWithHooks $ simpleUserHooks
314303 , preSDist = idrisPreSDist
315304 , sDistHook = idrisSDist (sDistHook simpleUserHooks)
316305 , postSDist = idrisPostSDist
317−#if __GLASGOW_HASKELL__ < 710
318− , testHook = idrisTestHook ()
319−#else
320306 , testHook = idrisTestHook
321−#endif
322307 }
idris.cabal+1−1
@@ -280,7 +280,7 @@ Library
280280 , ieee754 >= 0.7 && <= 0.8.0
281281 , mtl >= 2.1 && < 2.3
282282 , network < 2.7
283− , optparse-applicative >= 0.11 && < 0.14
283+ , optparse-applicative >= 0.13 && < 0.14
284284 , parsers >= 0.9 && < 0.13
285285 , pretty < 1.2
286286 , regex-tdfa >= 1.2
src/Idris/CmdOptions.hs−2
@@ -25,9 +25,7 @@ import Control.Monad.Trans.Except (throwE)
2525import Control.Monad.Trans.Reader (ask)
2626import Data.Char
2727import Data.Maybe
28−#if MIN_VERSION_optparse_applicative(0,13,0)
2928import Data.Monoid ((<>))
30−#endif
3129import Options.Applicative
3230import Options.Applicative.Arrows
3331import Options.Applicative.Types (ReadM(..))
src/Idris/Package/Parser.hs−7
@@ -6,9 +6,6 @@ License : BSD3
66Maintainer : The Idris Community.
77-}
88{-# LANGUAGE CPP, ConstraintKinds #-}
9−#if !(MIN_VERSION_base(4,8,0))
10−{-# LANGUAGE OverlappingInstances #-}
11−#endif
129module Idris.Package.Parser where
1310
1411import Idris.AbsSyntaxTree
@@ -50,11 +47,7 @@ instance {-# OVERLAPPING #-} DeltaParsing PParser where
5047 {-# INLINE restOfLine #-}
5148#endif
5249
53−#if MIN_VERSION_base(4,8,0)
5450instance {-# OVERLAPPING #-} TokenParsing PParser where
55−#else
56−instance TokenParsing PParser where
57−#endif
5851 someSpace = many (simpleWhiteSpace <|> singleLineComment <|> multiLineComment) *> pure ()
5952
6053
src/Idris/Parser/Helpers.hs−7
@@ -7,9 +7,6 @@ Maintainer : The Idris Community.
77-}
88{-# LANGUAGE CPP, ConstraintKinds, GeneralizedNewtypeDeriving, PatternGuards,
99 StandaloneDeriving #-}
10−#if !(MIN_VERSION_base(4,8,0))
11−{-# LANGUAGE OverlappingInstances #-}
12−#endif
1310module Idris.Parser.Helpers where
1411
1512import Idris.AbsSyntax
@@ -70,11 +67,7 @@ instance {-# OVERLAPPING #-} DeltaParsing IdrisParser where
7067
7168#endif
7269
73−#if MIN_VERSION_base(4,8,0)
7470instance {-# OVERLAPPING #-} TokenParsing IdrisParser where
75−#else
76−instance TokenParsing IdrisParser where
77−#endif
7871 someSpace = many (simpleWhiteSpace <|> singleLineComment <|> multiLineComment) *> pure ()
7972 token p = do s <- get
8073 (FC fn (sl, sc) _) <- getFC --TODO: Update after fixing getFC
src/Idris/Reflection.hs−5
@@ -21,11 +21,6 @@ import Idris.AbsSyntaxTree (ArgOpt(..), ElabD, Fixity(..), IState(idris_datatype
2121 initEState, pairCon, pairTy)
2222import Idris.Delaborate (delab)
2323
24−#if __GLASGOW_HASKELL__ < 710
25−import Control.Applicative (pure, (<$>), (<*>))
26−import Data.Traversable (mapM)
27−import Prelude hiding (mapM)
28−#endif
2924import Control.Monad (liftM, liftM2, liftM4)
3025import Control.Monad.State.Strict (lift)
3126import Data.List (findIndex, (\\))
test/TestRun.hs−2
@@ -7,9 +7,7 @@ import Control.Monad
77import Data.Char (isLetter)
88import qualified Data.IntMap as IMap
99import Data.List
10−#if MIN_VERSION_optparse_applicative(0,13,0)
1110import Data.Monoid ((<>))
12−#endif
1311import Data.Proxy
1412import Data.Typeable
1513import Options.Applicative