on master help sign in
Drop support for GHC <= 7.10.3
commitc4ac8cbc9f09c33d5845b59a106acfc1c68304ce authorThomas Scholtes <thomas-scholtes@gmx.de> dateSun 16 Jul 2017, 20:27 (9 years ago) parent05fbd11
5 files changed+1−41
.travis.yml−6 Setup.hs+1−16 src/Idris/Package/Parser.hs−7 src/Idris/Parser/Helpers.hs−7 src/Idris/Reflection.hs−5
.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 }
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
@@ -69,11 +66,7 @@ instance {-# OVERLAPPING #-} DeltaParsing IdrisParser where
6966
7067#endif
7168
72−#if MIN_VERSION_base(4,8,0)
7369instance {-# OVERLAPPING #-} TokenParsing IdrisParser where
74−#else
75−instance TokenParsing IdrisParser where
76−#endif
7770 someSpace = many (simpleWhiteSpace <|> singleLineComment <|> multiLineComment) *> pure ()
7871 token p = do s <- get
7972 (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, (\\))