support ghc 8

This commit is contained in:
Julian K. Arni 2016-09-14 09:37:14 -03:00
parent 84ebc6ed5f
commit 6537409968
5 changed files with 21 additions and 50 deletions

View File

@ -2,18 +2,12 @@ sudo: false
language: c language: c
env: matrix:
- GHCVER=7.10.2 include:
- env: CABALVER=1.22 GHCVER=7.10.1
addons: addons: {apt: {packages: [cabal-install-1.22,ghc-7.10.1],sources: [hvr-ghc]}}
apt: - env: CABALVER=1.24 GHCVER=8.0.1
sources: addons: {apt: {packages: [cabal-install-1.24,ghc-8.0.1], sources: [hvr-ghc]}}
- hvr-ghc
packages:
- ghc-7.10.2
- cabal-install-1.22
- libgmp-dev
- wrk
install: install:
- (mkdir -p $HOME/.local/bin && cd $HOME/.local/bin && wget https://zalora-public.s3.amazonaws.com/tinc && chmod +x tinc) - (mkdir -p $HOME/.local/bin && cd $HOME/.local/bin && wget https://zalora-public.s3.amazonaws.com/tinc && chmod +x tinc)
@ -25,7 +19,6 @@ install:
script: script:
- tinc && cabal configure --enable-tests && cabal build && cabal test - tinc && cabal configure --enable-tests && cabal build && cabal test
#- (cd doc && tinc cabal configure --enable-tests && cabal build && cabal test)
cache: cache:
directories: directories:

View File

@ -27,19 +27,19 @@ library
, Servant.QuickCheck.Internal.QuickCheck , Servant.QuickCheck.Internal.QuickCheck
, Servant.QuickCheck.Internal.Equality , Servant.QuickCheck.Internal.Equality
, Servant.QuickCheck.Internal.ErrorTypes , Servant.QuickCheck.Internal.ErrorTypes
build-depends: base >=4.8 && <4.9 build-depends: base >=4.8 && <4.10
, base-compat == 0.9.* , base-compat == 0.9.*
, aeson > 0.8 && < 0.12 , aeson > 0.8 && < 0.12
, bytestring == 0.10.* , bytestring == 0.10.*
, case-insensitive == 1.2.* , case-insensitive == 1.2.*
, data-default-class == 0.0.* , data-default-class >= 0.0 && < 0.2
, hspec == 2.2.* , hspec == 2.2.*
, http-client == 0.4.* , http-client >= 0.4.30 && < 0.5
, http-media == 0.6.* , http-media == 0.6.*
, http-types > 0.8 && < 0.10 , http-types > 0.8 && < 0.10
, mtl > 2.1 && < 2.3 , mtl > 2.1 && < 2.3
, pretty == 1.1.* , pretty == 1.1.*
, process == 1.2.* , process >= 1.2 && < 1.5
, QuickCheck > 2.7 && < 2.9 , QuickCheck > 2.7 && < 2.9
, servant > 0.6 && < 0.9 , servant > 0.6 && < 0.9
, servant-client > 0.6 && < 0.9 , servant-client > 0.6 && < 0.9

View File

@ -14,7 +14,7 @@ import Data.Monoid ((<>))
import GHC.Generics (Generic) import GHC.Generics (Generic)
import Network.HTTP.Client (Manager, Request, Response, httpLbs, import Network.HTTP.Client (Manager, Request, Response, httpLbs,
method, requestHeaders, responseBody, method, requestHeaders, responseBody,
responseHeaders, parseUrl, responseStatus) responseHeaders, parseRequest, responseStatus)
import Network.HTTP.Media (matchAccept) import Network.HTTP.Media (matchAccept)
import Network.HTTP.Types (methodGet, methodHead, parseMethod, import Network.HTTP.Types (methodGet, methodHead, parseMethod,
renderStdMethod, status100, status200, renderStdMethod, status100, status200,
@ -92,7 +92,7 @@ createContainsValidLocation
if responseStatus resp == status201 if responseStatus resp == status201
then case lookup "Location" $ responseHeaders resp of then case lookup "Location" $ responseHeaders resp of
Nothing -> fail n Nothing -> fail n
Just l -> case parseUrl $ SBSC.unpack l of Just l -> case parseRequest $ SBSC.unpack l of
Nothing -> fail n Nothing -> fail n
Just x -> do Just x -> do
resp2 <- httpLbs x mgr resp2 <- httpLbs x mgr

7
stack-ghc-8.0.1.yaml Normal file
View File

@ -0,0 +1,7 @@
# Specifies the GHC version and set of packages available (e.g., lts-3.5, nightly-2015-09-21, ghc-7.10.2)
resolver: nightly-2016-09-07
packages:
- '.'
extra-deps: []
flags: {}
extra-package-dbs: []

View File

@ -1,36 +1,7 @@
# Specifies the GHC version and set of packages available (e.g., lts-3.5, nightly-2015-09-21, ghc-7.10.2) # Specifies the GHC version and set of packages available (e.g., lts-3.5, nightly-2015-09-21, ghc-7.10.2)
resolver: nightly-2016-04-20 resolver: lts-6.17
# Local packages, usually specified by relative directory name
packages: packages:
- '.' - '.'
extra-deps: []
# Packages to be pulled from upstream that are not in the resolver (e.g., acme-missiles-0.3)
extra-deps:
- servant-0.8
- servant-client-0.8
- servant-server-0.8
# Override default flag values for local packages and extra-deps
flags: {} flags: {}
# Extra package databases containing global packages
extra-package-dbs: [] extra-package-dbs: []
# Control whether we use the GHC we find on the path
# system-ghc: true
# Require a specific version of stack, using version ranges
# require-stack-version: -any # Default
# require-stack-version: >= 1.0.0
# Override the architecture used by stack, especially useful on Windows
# arch: i386
# arch: x86_64
# Extra directories used by stack for building
# extra-include-dirs: [/path/to/dir]
# extra-lib-dirs: [/path/to/dir]
# Allow a newer minor version of GHC than the snapshot specifies
# compiler-check: newer-minor