Skip to content

Commit 760fabe

Browse files
authored
Merge pull request #108 from well-typed/ghc-8.8.1
Ghc 8.8.1
2 parents b869b5a + 29408c6 commit 760fabe

File tree

7 files changed

+49
-31
lines changed

7 files changed

+49
-31
lines changed

.travis.yml

Lines changed: 31 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
# This Travis job script has been generated by a script via
22
#
3-
# haskell-ci 'cabal.project' '--output' '.travis.yml' '--doctest' '--doctest-options=--preserve-it'
3+
# haskell-ci 'cabal.project' '--doctest' '--doctest-options=--preserve-it' '--benchmarks-jobs=<8.8'
44
#
55
# For more information, see https://github.com/haskell-CI/haskell-ci
66
#
7-
# version: 0.3.20190429
7+
# version: 0.3.20190815
88
#
99
language: c
1010
dist: xenial
@@ -26,6 +26,8 @@ before_cache:
2626
- rm -rfv $CABALHOME/packages/head.hackage
2727
matrix:
2828
include:
29+
- compiler: ghc-8.8.1
30+
addons: {"apt":{"sources":["hvr-ghc"],"packages":["ghc-8.8.1","cabal-install-3.0"]}}
2931
- compiler: ghc-8.6.5
3032
addons: {"apt":{"sources":["hvr-ghc"],"packages":["ghc-8.6.5","cabal-install-2.4"]}}
3133
- compiler: ghc-8.4.4
@@ -36,13 +38,14 @@ matrix:
3638
addons: {"apt":{"sources":["hvr-ghc"],"packages":["ghc-8.0.2","cabal-install-2.4"]}}
3739
before_install:
3840
- HC=$(echo "/opt/$CC/bin/ghc" | sed 's/-/\//')
41+
- WITHCOMPILER="-w $HC"
3942
- HCPKG="$HC-pkg"
4043
- unset CC
4144
- CABAL=/opt/ghc/bin/cabal
4245
- CABALHOME=$HOME/.cabal
4346
- export PATH="$CABALHOME/bin:$PATH"
4447
- TOP=$(pwd)
45-
- HCNUMVER=$(( $(${HC} --numeric-version|sed -E 's/([0-9]+)\.([0-9]+)\.([0-9]+).*/\1 * 10000 + \2 * 100 + \3/') ))
48+
- "HCNUMVER=$(${HC} --numeric-version|perl -ne '/^(\\d+)\\.(\\d+)\\.(\\d+)(\\.(\\d+))?$/; print(10000 * $1 + 100 * $2 + ($3 == 0 ? $5 != 1 : $3))')"
4649
- echo $HCNUMVER
4750
- CABAL="$CABAL -vnormal+nowrap+markoutput"
4851
- set -o pipefail
@@ -69,11 +72,13 @@ install:
6972
- echo "$(${HC} --version) [$(${HC} --print-project-git-commit-id 2> /dev/null || echo '?')]"
7073
- TEST=--enable-tests
7174
- BENCH=--enable-benchmarks
72-
- GHCHEAD=${GHCHEAD-false}
75+
- if [ $HCNUMVER -ge 80800 ] ; then BENCH=--disable-benchmarks ; fi
76+
- HEADHACKAGE=false
7377
- rm -f $CABALHOME/config
7478
- |
7579
echo "verbose: normal +nowrap +markoutput" >> $CABALHOME/config
7680
echo "remote-build-reporting: anonymous" >> $CABALHOME/config
81+
echo "write-ghc-environment-files: always" >> $CABALHOME/config
7782
echo "remote-repo-cache: $CABALHOME/packages" >> $CABALHOME/config
7883
echo "logs-dir: $CABALHOME/logs" >> $CABALHOME/config
7984
echo "world-file: $CABALHOME/world" >> $CABALHOME/config
@@ -89,63 +94,64 @@ install:
8994
- cat $CABALHOME/config
9095
- rm -fv cabal.project cabal.project.local cabal.project.freeze
9196
- travis_retry ${CABAL} v2-update -v
92-
- ${CABAL} v2-install -w ${HC} -j2 doctest --constraint='doctest ==0.16.*' | color_cabal_output
97+
- ${CABAL} v2-install $WITHCOMPILER -j2 doctest --constraint='doctest ==0.16.*' | color_cabal_output
9398
# Generate cabal.project
9499
- rm -rf cabal.project cabal.project.local cabal.project.freeze
95100
- touch cabal.project
96101
- |
97-
echo 'packages: "sop-core"' >> cabal.project
98-
echo 'packages: "generics-sop"' >> cabal.project
102+
echo "packages: sop-core" >> cabal.project
103+
echo "packages: generics-sop" >> cabal.project
99104
- |
100-
echo "write-ghc-environment-files: always" >> cabal.project
101105
- "for pkg in $($HCPKG list --simple-output); do echo $pkg | sed 's/-[^-]*$//' | (grep -vE -- '^(generics-sop|sop-core)$' || true) | sed 's/^/constraints: /' | sed 's/$/ installed/' >> cabal.project.local; done"
102106
- cat cabal.project || true
103107
- cat cabal.project.local || true
104108
- if [ -f "sop-core/configure.ac" ]; then (cd "sop-core" && autoreconf -i); fi
105109
- if [ -f "generics-sop/configure.ac" ]; then (cd "generics-sop" && autoreconf -i); fi
106-
- ${CABAL} v2-freeze -w ${HC} ${TEST} ${BENCH} | color_cabal_output
110+
- ${CABAL} v2-freeze $WITHCOMPILER ${TEST} ${BENCH} | color_cabal_output
107111
- "cat cabal.project.freeze | sed -E 's/^(constraints: *| *)//' | sed 's/any.//'"
108112
- rm cabal.project.freeze
109-
- ${CABAL} v2-build -w ${HC} ${TEST} ${BENCH} --dep -j2 all | color_cabal_output
110-
- ${CABAL} v2-build -w ${HC} --disable-tests --disable-benchmarks --dep -j2 all | color_cabal_output
113+
- ${CABAL} v2-build $WITHCOMPILER ${TEST} ${BENCH} --dep -j2 all | color_cabal_output
114+
- ${CABAL} v2-build $WITHCOMPILER --disable-tests --disable-benchmarks --dep -j2 all | color_cabal_output
111115
script:
112116
- DISTDIR=$(mktemp -d /tmp/dist-test.XXXX)
113117
# Packaging...
114118
- ${CABAL} v2-sdist all | color_cabal_output
115119
# Unpacking...
116120
- mv dist-newstyle/sdist/*.tar.gz ${DISTDIR}/
117121
- cd ${DISTDIR} || false
118-
- find . -maxdepth 1 -name '*.tar.gz' -exec tar -xvf '{}' \;
122+
- find . -maxdepth 1 -type f -name '*.tar.gz' -exec tar -xvf '{}' \;
123+
- find . -maxdepth 1 -type f -name '*.tar.gz' -exec rm '{}' \;
124+
- PKGDIR_sop_core="$(find . -maxdepth 1 -type d -regex '.*/sop-core-[0-9.]*')"
125+
- PKGDIR_generics_sop="$(find . -maxdepth 1 -type d -regex '.*/generics-sop-[0-9.]*')"
119126
# Generate cabal.project
120127
- rm -rf cabal.project cabal.project.local cabal.project.freeze
121128
- touch cabal.project
122129
- |
123-
echo 'packages: "sop-core-*/*.cabal"' >> cabal.project
124-
echo 'packages: "generics-sop-*/*.cabal"' >> cabal.project
130+
echo "packages: ${PKGDIR_sop_core}" >> cabal.project
131+
echo "packages: ${PKGDIR_generics_sop}" >> cabal.project
125132
- |
126-
echo "write-ghc-environment-files: always" >> cabal.project
127133
- "for pkg in $($HCPKG list --simple-output); do echo $pkg | sed 's/-[^-]*$//' | (grep -vE -- '^(generics-sop|sop-core)$' || true) | sed 's/^/constraints: /' | sed 's/$/ installed/' >> cabal.project.local; done"
128134
- cat cabal.project || true
129135
- cat cabal.project.local || true
130136
# Building...
131137
# this builds all libraries and executables (without tests/benchmarks)
132-
- ${CABAL} v2-build -w ${HC} --disable-tests --disable-benchmarks all | color_cabal_output
138+
- ${CABAL} v2-build $WITHCOMPILER --disable-tests --disable-benchmarks all | color_cabal_output
133139
# Building with tests and benchmarks...
134140
# build & run tests, build benchmarks
135-
- ${CABAL} v2-build -w ${HC} ${TEST} ${BENCH} all | color_cabal_output
141+
- ${CABAL} v2-build $WITHCOMPILER ${TEST} ${BENCH} all | color_cabal_output
136142
# Testing...
137-
- ${CABAL} v2-test -w ${HC} ${TEST} ${BENCH} all | color_cabal_output
143+
- ${CABAL} v2-test $WITHCOMPILER ${TEST} ${BENCH} all | color_cabal_output
138144
# Doctest...
139-
- (cd sop-core-* && doctest --preserve-it -XCPP -XScopedTypeVariables -XTypeFamilies -XRankNTypes -XTypeOperators -XGADTs -XConstraintKinds -XMultiParamTypeClasses -XTypeSynonymInstances -XFlexibleInstances -XFlexibleContexts -XDeriveFunctor -XDeriveFoldable -XDeriveTraversable -XDefaultSignatures -XKindSignatures -XDataKinds -XFunctionalDependencies -XAutoDeriveTypeable src)
140-
- (cd generics-sop-* && doctest --preserve-it -XCPP -XScopedTypeVariables -XTypeFamilies -XRankNTypes -XTypeOperators -XGADTs -XConstraintKinds -XMultiParamTypeClasses -XTypeSynonymInstances -XFlexibleInstances -XFlexibleContexts -XDeriveFunctor -XDeriveFoldable -XDeriveTraversable -XDefaultSignatures -XKindSignatures -XDataKinds -XFunctionalDependencies -XAutoDeriveTypeable src)
145+
- (cd ${PKGDIR_sop_core} && doctest --preserve-it -XCPP -XScopedTypeVariables -XTypeFamilies -XRankNTypes -XTypeOperators -XGADTs -XConstraintKinds -XMultiParamTypeClasses -XTypeSynonymInstances -XFlexibleInstances -XFlexibleContexts -XDeriveFunctor -XDeriveFoldable -XDeriveTraversable -XDefaultSignatures -XKindSignatures -XDataKinds -XFunctionalDependencies -XAutoDeriveTypeable src)
146+
- (cd ${PKGDIR_generics_sop} && doctest --preserve-it -XCPP -XScopedTypeVariables -XTypeFamilies -XRankNTypes -XTypeOperators -XGADTs -XConstraintKinds -XMultiParamTypeClasses -XTypeSynonymInstances -XFlexibleInstances -XFlexibleContexts -XDeriveFunctor -XDeriveFoldable -XDeriveTraversable -XDefaultSignatures -XKindSignatures -XDataKinds -XFunctionalDependencies -XAutoDeriveTypeable src)
141147
# cabal check...
142-
- (cd sop-core-* && ${CABAL} -vnormal check)
143-
- (cd generics-sop-* && ${CABAL} -vnormal check)
148+
- (cd ${PKGDIR_sop_core} && ${CABAL} -vnormal check)
149+
- (cd ${PKGDIR_generics_sop} && ${CABAL} -vnormal check)
144150
# haddock...
145-
- ${CABAL} v2-haddock -w ${HC} ${TEST} ${BENCH} all | color_cabal_output
151+
- ${CABAL} v2-haddock $WITHCOMPILER ${TEST} ${BENCH} all | color_cabal_output
146152
# Building without installed constraints for packages in global-db...
147153
- rm -f cabal.project.local
148-
- ${CABAL} v2-build -w ${HC} --disable-tests --disable-benchmarks all | color_cabal_output
154+
- ${CABAL} v2-build $WITHCOMPILER --disable-tests --disable-benchmarks all | color_cabal_output
149155

150-
# REGENDATA ["cabal.project","--output",".travis.yml","--doctest","--doctest-options=--preserve-it"]
156+
# REGENDATA ["cabal.project","--doctest","--doctest-options=--preserve-it","--benchmarks-jobs=<8.8"]
151157
# EOF

cabal.project

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
packages: sop-core/ generics-sop/
1+
packages: sop-core/ generics-sop/

generics-sop/generics-sop.cabal

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ category: Generics
4242
build-type: Simple
4343
cabal-version: >=1.10
4444
extra-source-files: CHANGELOG.md doctest.sh
45-
tested-with: GHC == 8.0.2, GHC == 8.2.2, GHC == 8.4.4, GHC == 8.6.5
45+
tested-with: GHC == 8.0.2, GHC == 8.2.2, GHC == 8.4.4, GHC == 8.6.5, GHC == 8.8.1
4646

4747
source-repository head
4848
type: git
@@ -67,7 +67,7 @@ library
6767
Generics.SOP.Sing
6868
build-depends: base >= 4.9 && < 5,
6969
sop-core == 0.5.0.*,
70-
template-haskell >= 2.8 && < 2.15,
70+
template-haskell >= 2.8 && < 2.16,
7171
ghc-prim >= 0.3 && < 0.6
7272
hs-source-dirs: src
7373
default-language: Haskell2010
@@ -90,7 +90,10 @@ library
9090
KindSignatures
9191
DataKinds
9292
FunctionalDependencies
93-
AutoDeriveTypeable
93+
94+
if impl(ghc <8.2)
95+
default-extensions: AutoDeriveTypeable
96+
9497
-- if impl(ghc >= 8.6)
9598
-- default-extensions: NoStarIsType
9699
other-extensions: PolyKinds

generics-sop/src/Generics/SOP/Type/Metadata.hs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,9 @@ module Generics.SOP.Type.Metadata
3333
, Associativity(..)
3434
) where
3535

36+
#if __GLASGOW_HASKELL__ <802
3637
import Data.Kind (Type)
38+
#endif
3739
import Data.Proxy (Proxy (..))
3840
import GHC.Generics
3941
( Associativity(..)

sop-core/sop-core.cabal

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ category: Data
2525
build-type: Simple
2626
cabal-version: >=1.10
2727
extra-source-files: CHANGELOG.md doctest.sh
28-
tested-with: GHC == 8.0.2, GHC == 8.2.2, GHC == 8.4.4, GHC == 8.6.5
28+
tested-with: GHC == 8.0.2, GHC == 8.2.2, GHC == 8.4.4, GHC == 8.6.5, GHC == 8.8.1
2929

3030
source-repository head
3131
type: git
@@ -64,7 +64,10 @@ library
6464
KindSignatures
6565
DataKinds
6666
FunctionalDependencies
67-
AutoDeriveTypeable
67+
68+
if impl(ghc <8.2)
69+
default-extensions: AutoDeriveTypeable
70+
6871
-- if impl(ghc >= 8.6)
6972
-- default-extensions: NoStarIsType
7073
other-extensions: PolyKinds

sop-core/src/Data/SOP/BasicFunctors.hs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,9 @@ module Data.SOP.BasicFunctors
4343
, mapKKK
4444
) where
4545

46+
#if !MIN_VERSION_base(4,11,0)
4647
import Data.Semigroup (Semigroup (..))
48+
#endif
4749
import Data.Kind (Type)
4850
import qualified GHC.Generics as GHC
4951

sop-core/src/Data/SOP/NP.hs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -91,7 +91,9 @@ import Data.Coerce
9191
import Data.Kind (Type)
9292
import Data.Proxy (Proxy(..))
9393
import Unsafe.Coerce
94+
#if !MIN_VERSION_base(4,11,0)
9495
import Data.Semigroup (Semigroup (..))
96+
#endif
9597

9698
import Control.DeepSeq (NFData(..))
9799

0 commit comments

Comments
 (0)