Skip to content

Commit f4aec7f

Browse files
committed
Bump to GHC 8.0
* Raise minimum GHC version to 8.0 so we'll be able to define `Lift` instances, avoid certain conditional definitions, etc. * Raise Cabal version for tests to 2.2; use `common` stanzas.
1 parent 5c1ce92 commit f4aec7f

34 files changed

+143
-796
lines changed

.github/workflows/haskell-ci.yml

Lines changed: 3 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -8,9 +8,9 @@
88
#
99
# For more information, see https://github.com/haskell-CI/haskell-ci
1010
#
11-
# version: 0.13.20211111
11+
# version: 0.13.20211030
1212
#
13-
# REGENDATA ("0.13.20211111",["github","--config=cabal.haskell-ci","cabal.project"])
13+
# REGENDATA ("0.13.20211030",["github","--config=cabal.haskell-ci","cabal.project"])
1414
#
1515
name: Haskell-CI
1616
on:
@@ -24,8 +24,6 @@ jobs:
2424
linux:
2525
name: Haskell-CI - Linux - ${{ matrix.compiler }}
2626
runs-on: ubuntu-18.04
27-
timeout-minutes:
28-
60
2927
container:
3028
image: buildpack-deps:bionic
3129
continue-on-error: ${{ matrix.allow-failure }}
@@ -72,21 +70,6 @@ jobs:
7270
compilerVersion: 8.0.2
7371
setup-method: hvr-ppa
7472
allow-failure: false
75-
- compiler: ghc-7.10.3
76-
compilerKind: ghc
77-
compilerVersion: 7.10.3
78-
setup-method: hvr-ppa
79-
allow-failure: false
80-
- compiler: ghc-7.8.4
81-
compilerKind: ghc
82-
compilerVersion: 7.8.4
83-
setup-method: hvr-ppa
84-
allow-failure: false
85-
- compiler: ghc-7.6.3
86-
compilerKind: ghc
87-
compilerVersion: 7.6.3
88-
setup-method: hvr-ppa
89-
allow-failure: false
9073
fail-fast: false
9174
steps:
9275
- name: apt
@@ -136,7 +119,7 @@ jobs:
136119
HCNUMVER=$(${HC} --numeric-version|perl -ne '/^(\d+)\.(\d+)\.(\d+)(\.(\d+))?$/; print(10000 * $1 + 100 * $2 + ($3 == 0 ? $5 != 1 : $3))')
137120
echo "HCNUMVER=$HCNUMVER" >> "$GITHUB_ENV"
138121
echo "ARG_TESTS=--enable-tests" >> "$GITHUB_ENV"
139-
if [ $((HCNUMVER >= 70800 && HCNUMVER < 90200)) -ne 0 ] ; then echo "ARG_BENCH=--enable-benchmarks" >> "$GITHUB_ENV" ; else echo "ARG_BENCH=--disable-benchmarks" >> "$GITHUB_ENV" ; fi
122+
if [ $((HCNUMVER < 90200)) -ne 0 ] ; then echo "ARG_BENCH=--enable-benchmarks" >> "$GITHUB_ENV" ; else echo "ARG_BENCH=--disable-benchmarks" >> "$GITHUB_ENV" ; fi
140123
echo "HEADHACKAGE=false" >> "$GITHUB_ENV"
141124
echo "ARG_COMPILER=--$HCKIND --with-compiler=$HC" >> "$GITHUB_ENV"
142125
echo "GHCJSARITH=0" >> "$GITHUB_ENV"
@@ -166,10 +149,6 @@ jobs:
166149
repository hackage.haskell.org
167150
url: http://hackage.haskell.org/
168151
EOF
169-
cat >> $CABAL_CONFIG <<EOF
170-
program-default-options
171-
ghc-options: $GHCJOBS +RTS -M3G -RTS
172-
EOF
173152
cat $CABAL_CONFIG
174153
- name: versions
175154
run: |

containers-tests/benchmarks/IntSet.hs

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,9 +8,6 @@ import Control.Exception (evaluate)
88
import Gauge (bench, defaultMain, whnf)
99
import Data.List (foldl')
1010
import Data.Monoid (Sum(..))
11-
#if !MIN_VERSION_base(4,8,0)
12-
import Data.Foldable (foldMap)
13-
#endif
1411
import qualified Data.IntSet as IS
1512
-- benchmarks for "instance Ord IntSet"
1613
-- uses IntSet as keys of maps, and elements of sets

containers-tests/benchmarks/Map.hs

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -13,9 +13,7 @@ import qualified Data.Map.Strict as MS
1313
import Data.Map (alterF)
1414
import Data.Maybe (fromMaybe)
1515
import Data.Functor ((<$))
16-
#if __GLASGOW_HASKELL__ >= 708
1716
import Data.Coerce
18-
#endif
1917
import Prelude hiding (lookup)
2018

2119
main = do
@@ -134,11 +132,7 @@ atIns xs m = foldl' (\m (k, v) -> runIdentity (alterF (\_ -> Identity (Just v))
134132

135133
newtype Ident a = Ident { runIdent :: a }
136134
instance Functor Ident where
137-
#if __GLASGOW_HASKELL__ >= 708
138135
fmap = coerce
139-
#else
140-
fmap f (Ident a) = Ident (f a)
141-
#endif
142136

143137
atInsNoRules :: [(Int, Int)] -> M.Map Int Int -> M.Map Int Int
144138
atInsNoRules xs m = foldl' (\m (k, v) -> runIdent (alterF (\_ -> Ident (Just v)) k m)) m xs

0 commit comments

Comments
 (0)