Skip to content

Commit

Permalink
Support GHC-8.6
Browse files Browse the repository at this point in the history
  • Loading branch information
phadej committed Sep 24, 2018
1 parent 2c0800e commit ff11afe
Show file tree
Hide file tree
Showing 6 changed files with 45 additions and 135 deletions.
28 changes: 9 additions & 19 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
#
# runghc make_travis_yml_2.hs '--config' '--output' '.travis.yml' 'http-api-data.cabal'
#
# For more information, see https://github.com/hvr/multi-ghc-travis
# For more information, see https://github.com/haskell-CI/haskell-ci
#
language: c
sudo: false
Expand Down Expand Up @@ -32,21 +32,24 @@ before_cache:

matrix:
include:
- compiler: "ghc-8.6.1"
# env: TEST=--disable-tests BENCH=--disable-benchmarks
addons: {apt: {packages: [ghc-ppa-tools,cabal-install-2.4,ghc-8.6.1], sources: [hvr-ghc]}}
- compiler: "ghc-8.4.3"
# env: TEST=--disable-tests BENCH=--disable-benchmarks
addons: {apt: {packages: [ghc-ppa-tools,cabal-install-2.2,ghc-8.4.3], sources: [hvr-ghc]}}
addons: {apt: {packages: [ghc-ppa-tools,cabal-install-2.4,ghc-8.4.3], sources: [hvr-ghc]}}
- compiler: "ghc-8.2.2"
# env: TEST=--disable-tests BENCH=--disable-benchmarks
addons: {apt: {packages: [ghc-ppa-tools,cabal-install-2.2,ghc-8.2.2], sources: [hvr-ghc]}}
addons: {apt: {packages: [ghc-ppa-tools,cabal-install-2.4,ghc-8.2.2], sources: [hvr-ghc]}}
- compiler: "ghc-8.0.2"
# env: TEST=--disable-tests BENCH=--disable-benchmarks
addons: {apt: {packages: [ghc-ppa-tools,cabal-install-2.2,ghc-8.0.2], sources: [hvr-ghc]}}
addons: {apt: {packages: [ghc-ppa-tools,cabal-install-2.4,ghc-8.0.2], sources: [hvr-ghc]}}
- compiler: "ghc-7.10.3"
# env: TEST=--disable-tests BENCH=--disable-benchmarks
addons: {apt: {packages: [ghc-ppa-tools,cabal-install-2.2,ghc-7.10.3], sources: [hvr-ghc]}}
addons: {apt: {packages: [ghc-ppa-tools,cabal-install-2.4,ghc-7.10.3], sources: [hvr-ghc]}}
- compiler: "ghc-7.8.4"
# env: TEST=--disable-tests BENCH=--disable-benchmarks
addons: {apt: {packages: [ghc-ppa-tools,cabal-install-2.2,ghc-7.8.4], sources: [hvr-ghc]}}
addons: {apt: {packages: [ghc-ppa-tools,cabal-install-2.4,ghc-7.8.4], sources: [hvr-ghc]}}

before_install:
- HC=${CC}
Expand Down Expand Up @@ -116,18 +119,5 @@ script:
# Build without installed constraints for packages in global-db
- if $UNCONSTRAINED; then rm -f cabal.project.local; echo cabal new-build -w ${HC} --disable-tests --disable-benchmarks all; else echo "Not building without installed constraints"; fi

# Constraint sets
- rm -rf cabal.project.local

# Constraint set lower-bounds-7.8.4
- if [ $HCNUMVER -eq 70804 ]; then cabal new-build -w ${HC} --disable-tests --disable-benchmarks --constraint='attoparsec ==0.13.0.1' --constraint='attoparsec-iso8601 ==1.0.0.0' --constraint='bytestring ==0.10.4.0' --constraint='containers ==0.5.5.1' --constraint='hashable ==1.1.2.4' --constraint='http-types ==0.8.6' --constraint='semigroups ==0.16' --constraint='text ==1.1.1.3' --constraint='time ==1.4.2' --constraint='time-local-compat ==0.1.1.0' --constraint='unordered-containers ==0.2.6.0' --constraint='uri-bytestring ==0.1.7' --constraint='uuid-types ==1.0.2' all; else echo skipping...; fi

# Constraint set lower-bounds-7.10.3
- if [ $HCNUMVER -eq 71003 ]; then cabal new-build -w ${HC} --disable-tests --disable-benchmarks --constraint='attoparsec ==0.13.0.1' --constraint='attoparsec-iso8601 ==1.0.0.0' --constraint='bytestring ==0.10.6.0' --constraint='containers ==0.5.6.1' --constraint='hashable ==1.2.3.2' --constraint='http-types ==0.8.6' --constraint='semigroups ==0.16.0.1' --constraint='text ==1.2.0.2' --constraint='time ==1.5.0.1' --constraint='time-local-compat ==0.1.1.0' --constraint='unordered-containers ==0.2.6.0' --constraint='uri-bytestring ==0.1.7' --constraint='uuid-types ==1.0.2' all; else echo skipping...; fi

# Constraint set lower-bounds-8.0.2
- if [ $HCNUMVER -eq 80002 ]; then cabal new-build -w ${HC} --disable-tests --disable-benchmarks --constraint='attoparsec ==0.13.0.1' --constraint='attoparsec-iso8601 ==1.0.0.0' --constraint='bytestring ==0.10.6.0' --constraint='containers ==0.5.7.0' --constraint='hashable ==1.2.4.0' --constraint='http-types ==0.8.6' --constraint='text ==1.2.2.0' --constraint='time ==1.5.0.1' --constraint='time-local-compat ==0.1.1.0' --constraint='unordered-containers ==0.2.6.0' --constraint='uri-bytestring ==0.2.1.0' --constraint='uuid-types ==1.0.2' all; else echo skipping...; fi


# REGENDATA ["--config","--output",".travis.yml","http-api-data.cabal"]
# EOF
54 changes: 0 additions & 54 deletions cabal.make-travis-yml
Original file line number Diff line number Diff line change
@@ -1,56 +1,2 @@
jobs: :2
branches: master

-- we use http-types ==0.8.6
-- because build plan has blaze-builder-0.4
--
-- strict lower-bound for http-types ==0.8.3,
constraint-set lower-bounds-7.8.4
ghc: == 7.8.4
constraints:
attoparsec ==0.13.0.1,
attoparsec-iso8601 ==1.0.0.0,
bytestring ==0.10.4.0,
containers ==0.5.5.1,
hashable ==1.1.2.4,
http-types ==0.8.6,
semigroups ==0.16,
text ==1.1.1.3,
time ==1.4.2,
time-local-compat ==0.1.1.0,
unordered-containers ==0.2.6.0,
uri-bytestring ==0.1.7,
uuid-types ==1.0.2

constraint-set lower-bounds-7.10.3
ghc: == 7.10.3
constraints:
attoparsec ==0.13.0.1,
attoparsec-iso8601 ==1.0.0.0,
bytestring ==0.10.6.0,
containers ==0.5.6.1,
hashable ==1.2.3.2,
http-types ==0.8.6,
semigroups ==0.16.0.1,
text ==1.2.0.2,
time ==1.5.0.1,
time-local-compat ==0.1.1.0,
unordered-containers ==0.2.6.0,
uri-bytestring ==0.1.7,
uuid-types ==1.0.2

constraint-set lower-bounds-8.0.2
ghc: == 8.0.2
constraints:
attoparsec ==0.13.0.1,
attoparsec-iso8601 ==1.0.0.0,
bytestring ==0.10.6.0,
containers ==0.5.7.0,
hashable ==1.2.4.0,
http-types ==0.8.6,
text ==1.2.2.0,
time ==1.5.0.1,
time-local-compat ==0.1.1.0,
unordered-containers ==0.2.6.0,
uri-bytestring ==0.2.1.0,
uuid-types ==1.0.2
54 changes: 33 additions & 21 deletions http-api-data.cabal
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,8 @@ tested-with:
GHC==7.10.3,
GHC==8.0.2,
GHC==8.2.2,
GHC==8.4.3
GHC==8.4.3,
GHC==8.6.1

custom-setup
setup-depends:
Expand All @@ -40,24 +41,32 @@ flag use-text-show
library
hs-source-dirs: src/
include-dirs: include/
build-depends: base >= 4.7 && < 4.12
, attoparsec >= 0.13.0.1 && < 0.14
, attoparsec-iso8601 >= 1.0.0.0 && < 1.1

-- GHC bundled
build-depends: base >= 4.7 && < 4.13
, bytestring >= 0.10.4.0 && < 0.11
, containers >= 0.5.5.1 && < 0.6
, hashable >= 1.1.2.4 && < 1.3
, http-types >= 0.8.6 && < 0.13
, text >= 1.1.1.3 && < 1.3
, containers >= 0.5.5.1 && < 0.7
, text >= 1.2.3.0 && < 1.3
, time >= 1.4.2 && < 1.9
, time-locale-compat >= 0.1.1.0 && < 0.2
, unordered-containers >= 0.2.6.0 && < 0.3
, uuid-types >= 1.0.2 && < 1.1
, cookie >= 0.4 && < 0.45

-- other-dependencies
build-depends:
attoparsec >= 0.13.2.2 && < 0.14
, attoparsec-iso8601 >= 1.0.0.0 && < 1.1
, cookie >= 0.4.3 && < 0.4.5
, hashable >= 1.2.7.0 && < 1.3
, http-types >= 0.12.1 && < 0.13
, time-locale-compat >= 0.1.1.5 && < 0.2
, unordered-containers >= 0.2.9.0 && < 0.3
, uuid-types >= 1.0.3 && <1.1

if !impl(ghc >= 8.0)
build-depends: semigroups >= 0.16 && < 0.19
build-depends: semigroups >= 0.18.5 && < 0.19

if flag(use-text-show)
cpp-options: -DUSE_TEXT_SHOW
build-depends: text-show >= 2
build-depends: text-show >= 3.7.4 && <3.8

exposed-modules:
Web.HttpApiData
Web.FormUrlEncoded
Expand All @@ -76,26 +85,29 @@ test-suite spec
hs-source-dirs: test
ghc-options: -Wall
default-language: Haskell2010
build-tool-depends: hspec-discover:hspec-discover >= 2.4.7 && <2.5
build-depends: HUnit
, hspec >= 2.4.7
, base
build-tool-depends: hspec-discover:hspec-discover >= 2.5.5 && <2.6
-- inherited depndencies
build-depends:
base
, bytestring
, QuickCheck >=2.9
, quickcheck-instances >= 0.3.12
, unordered-containers
, http-api-data
, text
, time
, bytestring
, uuid-types

build-depends: HUnit >= 1.6.0.0 && <1.7
, hspec >= 2.5.5 && <2.6
, QuickCheck >= 2.11.3 && <2.13
, quickcheck-instances >= 0.3.19 && <0.4

test-suite doctests
ghc-options: -Wall
build-depends:
base,
directory >= 1.0,
doctest >= 0.11 && <0.17,
doctest >= 0.16.0 && <0.17,
filepath
default-language: Haskell2010
hs-source-dirs: test
Expand Down
12 changes: 0 additions & 12 deletions stack-ghc-7.10.yaml

This file was deleted.

26 changes: 0 additions & 26 deletions stack-ghc-7.8.yaml

This file was deleted.

6 changes: 3 additions & 3 deletions stack.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
resolver: lts-12.10
packages:
- '.'
flags:
http-api-data:
use-text-show: false
packages:
- .
resolver: lts-12.9

0 comments on commit ff11afe

Please sign in to comment.