on master help sign in
Drop support for GHC <= 7.10.3
c4ac8cbThomas Scholtes
.travis.yml−6
@@ -14,12 +14,6 @@ matrix:
14 - os: osx
14 - os: osx
15 env: CABALVER="1.24" GHCVER="8.0.1" TESTS="test_c"
15 env: CABALVER="1.24" GHCVER="8.0.1" TESTS="test_c"
16 compiler: ": #GHC 8.0.1"
16 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]}}
23 - env: CABALVER="1.22" GHCVER="7.10.3" TESTS="lib_doc doc"
17 - env: CABALVER="1.22" GHCVER="7.10.3" TESTS="lib_doc doc"
24 compiler: ": #GHC 7.10.3"
18 compiler: ": #GHC 7.10.3"
25 addons: {apt: {packages: [cabal-install-1.22,ghc-7.10.3,cppcheck,hscolour], sources: [hvr-ghc]}}
19 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)) $
274-- -----------------------------------------------------------------------------
274-- -----------------------------------------------------------------------------
275-- Test
275-- Test
276
276
277−-- FIXME: We use the __GLASGOW_HASKELL__ macro because MIN_VERSION_cabal seems
278−-- to be broken !
279−
280-- There are two "dataDir" in cabal, and they don't relate to each other.
277-- There are two "dataDir" in cabal, and they don't relate to each other.
281-- When fetching modules, idris uses the second path (in the pkg record),
278-- When fetching modules, idris uses the second path (in the pkg record),
282-- which by default is the root folder of the project.
279-- which by default is the root folder of the project.
283-- We want it to be the install directory where we put the idris libraries.
280-- We want it to be the install directory where we put the idris libraries.
284fixPkg pkg target = pkg { dataDir = target }
281fixPkg pkg target = pkg { dataDir = target }
285
282
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−
294idrisTestHook args pkg local hooks flags = do
283idrisTestHook args pkg local hooks flags = do
295 let target = datadir $ L.absoluteInstallDirs pkg local NoCopyDest
284 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
297
286
298-- -----------------------------------------------------------------------------
287-- -----------------------------------------------------------------------------
299-- Main
288-- Main
@@ -314,9 +303,5 @@ main = defaultMainWithHooks $ simpleUserHooks
314 , preSDist = idrisPreSDist
303 , preSDist = idrisPreSDist
315 , sDistHook = idrisSDist (sDistHook simpleUserHooks)
304 , sDistHook = idrisSDist (sDistHook simpleUserHooks)
316 , postSDist = idrisPostSDist
305 , postSDist = idrisPostSDist
317−#if __GLASGOW_HASKELL__ < 710
318− , testHook = idrisTestHook ()
319−#else
320 , testHook = idrisTestHook
306 , testHook = idrisTestHook
321−#endif
322 }
307 }
src/Idris/Package/Parser.hs−7
@@ -6,9 +6,6 @@ License : BSD3
6Maintainer : The Idris Community.
6Maintainer : The Idris Community.
7-}
7-}
8{-# LANGUAGE CPP, ConstraintKinds #-}
8{-# LANGUAGE CPP, ConstraintKinds #-}
9−#if !(MIN_VERSION_base(4,8,0))
10−{-# LANGUAGE OverlappingInstances #-}
11−#endif
12module Idris.Package.Parser where
9module Idris.Package.Parser where
13
10
14import Idris.AbsSyntaxTree
11import Idris.AbsSyntaxTree
@@ -50,11 +47,7 @@ instance {-# OVERLAPPING #-} DeltaParsing PParser where
50 {-# INLINE restOfLine #-}
47 {-# INLINE restOfLine #-}
51#endif
48#endif
52
49
53−#if MIN_VERSION_base(4,8,0)
54instance {-# OVERLAPPING #-} TokenParsing PParser where
50instance {-# OVERLAPPING #-} TokenParsing PParser where
55−#else
56−instance TokenParsing PParser where
57−#endif
58 someSpace = many (simpleWhiteSpace <|> singleLineComment <|> multiLineComment) *> pure ()
51 someSpace = many (simpleWhiteSpace <|> singleLineComment <|> multiLineComment) *> pure ()
59
52
60
53
src/Idris/Parser/Helpers.hs−7
@@ -7,9 +7,6 @@ Maintainer : The Idris Community.
7-}
7-}
8{-# LANGUAGE CPP, ConstraintKinds, GeneralizedNewtypeDeriving, PatternGuards,
8{-# LANGUAGE CPP, ConstraintKinds, GeneralizedNewtypeDeriving, PatternGuards,
9 StandaloneDeriving #-}
9 StandaloneDeriving #-}
10−#if !(MIN_VERSION_base(4,8,0))
11−{-# LANGUAGE OverlappingInstances #-}
12−#endif
13module Idris.Parser.Helpers where
10module Idris.Parser.Helpers where
14
11
15import Idris.AbsSyntax
12import Idris.AbsSyntax
@@ -69,11 +66,7 @@ instance {-# OVERLAPPING #-} DeltaParsing IdrisParser where
69
66
70#endif
67#endif
71
68
72−#if MIN_VERSION_base(4,8,0)
73instance {-# OVERLAPPING #-} TokenParsing IdrisParser where
69instance {-# OVERLAPPING #-} TokenParsing IdrisParser where
74−#else
75−instance TokenParsing IdrisParser where
76−#endif
77 someSpace = many (simpleWhiteSpace <|> singleLineComment <|> multiLineComment) *> pure ()
70 someSpace = many (simpleWhiteSpace <|> singleLineComment <|> multiLineComment) *> pure ()
78 token p = do s <- get
71 token p = do s <- get
79 (FC fn (sl, sc) _) <- getFC --TODO: Update after fixing getFC
72 (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
21 initEState, pairCon, pairTy)
21 initEState, pairCon, pairTy)
22import Idris.Delaborate (delab)
22import Idris.Delaborate (delab)
23
23
24−#if __GLASGOW_HASKELL__ < 710
25−import Control.Applicative (pure, (<$>), (<*>))
26−import Data.Traversable (mapM)
27−import Prelude hiding (mapM)
28−#endif
29import Control.Monad (liftM, liftM2, liftM4)
24import Control.Monad (liftM, liftM2, liftM4)
30import Control.Monad.State.Strict (lift)
25import Control.Monad.State.Strict (lift)
31import Data.List (findIndex, (\\))
26import Data.List (findIndex, (\\))