diff --git a/.travis.yml b/.travis.yml index 929b0b13..d6854b8a 100644 --- a/.travis.yml +++ b/.travis.yml @@ -3,8 +3,9 @@ sudo: false language: c env: - - GHCVER=7.8.4 - - GHCVER=7.10.2 + - GHCVER=7.8.4 CABALVER=1.22 + - GHCVER=7.10.3 CABALVER=1.22 + - GHCVER=8.0.1 CABALVER=1.24 addons: apt: @@ -12,13 +13,15 @@ addons: - hvr-ghc packages: - ghc-7.8.4 - - ghc-7.10.2 + - ghc-7.10.3 + - ghc-8.0.1 - cabal-install-1.22 + - cabal-install-1.24 - libgmp-dev install: - (mkdir -p $HOME/.local/bin && cd $HOME/.local/bin && wget https://zalora-public.s3.amazonaws.com/tinc && chmod +x tinc) - - export PATH=/opt/ghc/$GHCVER/bin:/opt/cabal/1.22/bin:$PATH + - export PATH=/opt/ghc/$GHCVER/bin:/opt/cabal/$CABALVER/bin:$PATH - ghc --version - cabal --version - travis_retry cabal update diff --git a/servant-client/servant-client.cabal b/servant-client/servant-client.cabal index 64164cf7..55886ef2 100644 --- a/servant-client/servant-client.cabal +++ b/servant-client/servant-client.cabal @@ -56,6 +56,8 @@ library hs-source-dirs: src default-language: Haskell2010 ghc-options: -Wall + if impl(ghc >= 8.0) + ghc-options: -Wno-redundant-constraints include-dirs: include test-suite spec diff --git a/servant-client/test/Servant/ClientSpec.hs b/servant-client/test/Servant/ClientSpec.hs index c41b4093..4a6ed243 100644 --- a/servant-client/test/Servant/ClientSpec.hs +++ b/servant-client/test/Servant/ClientSpec.hs @@ -15,7 +15,11 @@ {-# LANGUAGE TypeFamilies #-} {-# LANGUAGE TypeOperators #-} {-# LANGUAGE UndecidableInstances #-} +#if __GLASGOW_HASKELL__ >= 800 +{-# OPTIONS_GHC -freduction-depth=100 #-} +#else {-# OPTIONS_GHC -fcontext-stack=100 #-} +#endif {-# OPTIONS_GHC -fno-warn-orphans #-} {-# OPTIONS_GHC -fno-warn-name-shadowing #-} diff --git a/servant-docs/servant-docs.cabal b/servant-docs/servant-docs.cabal index dc7f19b3..4352d259 100644 --- a/servant-docs/servant-docs.cabal +++ b/servant-docs/servant-docs.cabal @@ -50,6 +50,8 @@ library hs-source-dirs: src default-language: Haskell2010 ghc-options: -Wall + if impl(ghc >= 8.0) + ghc-options: -Wno-redundant-constraints include-dirs: include executable greet-docs diff --git a/servant-foreign/servant-foreign.cabal b/servant-foreign/servant-foreign.cabal index 3e246e53..a5f91a39 100644 --- a/servant-foreign/servant-foreign.cabal +++ b/servant-foreign/servant-foreign.cabal @@ -37,6 +37,8 @@ library hs-source-dirs: src default-language: Haskell2010 ghc-options: -Wall + if impl(ghc >= 8.0) + ghc-options: -Wno-redundant-constraints include-dirs: include default-extensions: CPP , ConstraintKinds diff --git a/servant-mock/servant-mock.cabal b/servant-mock/servant-mock.cabal index fd816ebe..8e750d69 100644 --- a/servant-mock/servant-mock.cabal +++ b/servant-mock/servant-mock.cabal @@ -29,7 +29,7 @@ library http-types >= 0.8 && <0.10, servant == 0.7.*, servant-server == 0.7.*, - transformers >= 0.3 && <0.5, + transformers >= 0.3 && <0.6, QuickCheck >= 2.7 && <2.9, wai >= 3.0 && <3.3 hs-source-dirs: src diff --git a/servant-server/servant-server.cabal b/servant-server/servant-server.cabal index f9c64b25..56908b41 100644 --- a/servant-server/servant-server.cabal +++ b/servant-server/servant-server.cabal @@ -74,6 +74,8 @@ library hs-source-dirs: src default-language: Haskell2010 ghc-options: -Wall + if impl(ghc >= 8.0) + ghc-options: -Wno-redundant-constraints include-dirs: include executable greet @@ -99,9 +101,11 @@ test-suite spec other-modules: Servant.Server.ErrorSpec Servant.Server.Internal.ContextSpec - Servant.ServerSpec + Servant.Server.RouterSpec + Servant.Server.StreamingSpec Servant.Server.UsingContextSpec Servant.Server.UsingContextSpec.TestCombinators + Servant.ServerSpec Servant.Utils.StaticFilesSpec build-depends: base == 4.* @@ -122,7 +126,7 @@ test-suite spec , servant , servant-server , string-conversions - , should-not-typecheck == 2.* + , should-not-typecheck == 2.1.* , temporary , text , transformers diff --git a/servant-server/src/Servant/Server/Internal/Context.hs b/servant-server/src/Servant/Server/Internal/Context.hs index cf84689b..3dd3a898 100644 --- a/servant-server/src/Servant/Server/Internal/Context.hs +++ b/servant-server/src/Servant/Server/Internal/Context.hs @@ -59,7 +59,7 @@ instance (Eq a, Eq (Context as)) => Eq (Context (a ': as)) where -- -- >>> getContextEntry (True :. False :. EmptyContext) :: String -- ... --- No instance for (HasContextEntry '[] [Char]) +-- ...No instance for (HasContextEntry '[] [Char]) -- ... class HasContextEntry (context :: [*]) (val :: *) where getContextEntry :: Context context -> val diff --git a/servant/servant.cabal b/servant/servant.cabal index 3c35a5da..cfaa7384 100644 --- a/servant/servant.cabal +++ b/servant/servant.cabal @@ -49,7 +49,7 @@ library Servant.Utils.Links Servant.Utils.Enter build-depends: - base >= 4.7 && < 4.9 + base >= 4.7 && < 4.10 , base-compat >= 0.9 , aeson >= 0.7 , attoparsec >= 0.12 @@ -88,6 +88,8 @@ library , TypeSynonymInstances , UndecidableInstances ghc-options: -Wall + if impl(ghc >= 8.0) + ghc-options: -Wno-redundant-constraints include-dirs: include test-suite spec diff --git a/servant/src/Servant/Utils/Links.hs b/servant/src/Servant/Utils/Links.hs index 85bc6585..b2157c04 100644 --- a/servant/src/Servant/Utils/Links.hs +++ b/servant/src/Servant/Utils/Links.hs @@ -72,14 +72,8 @@ -- >>> let bad_link = Proxy :: Proxy ("hello" :> Delete '[JSON] ()) -- >>> safeLink api bad_link -- ... --- Could not deduce (Or --- (IsElem' (Verb 'DELETE 200 '[JSON] ()) (Verb 'GET 200 '[JSON] Int)) --- (IsElem' --- ("hello" :> Delete '[JSON] ()) --- ("bye" :> (QueryParam "name" String :> Delete '[JSON] ())))) --- arising from a use of ‘safeLink’ --- In the expression: safeLink api bad_link --- In an equation for ‘it’: it = safeLink api bad_link +-- ...Could not deduce... +-- ... -- -- This error is essentially saying that the type family couldn't find -- bad_link under api after trying the open (but empty) type family diff --git a/servant/test/Servant/Utils/LinksSpec.hs b/servant/test/Servant/Utils/LinksSpec.hs index 07e0b068..8c0d3f3a 100644 --- a/servant/test/Servant/Utils/LinksSpec.hs +++ b/servant/test/Servant/Utils/LinksSpec.hs @@ -67,27 +67,27 @@ spec = describe "Servant.Utils.Links" $ do -- -- >>> apiLink (Proxy :: Proxy WrongPath) -- ... --- Could not deduce ... +-- ...Could not deduce... -- ... -- -- >>> apiLink (Proxy :: Proxy WrongReturnType) -- ... --- Could not deduce ... +-- ...Could not deduce... -- ... -- -- >>> apiLink (Proxy :: Proxy WrongContentType) -- ... --- Could not deduce ... +-- ...Could not deduce... -- ... -- -- >>> apiLink (Proxy :: Proxy WrongMethod) -- ... --- Could not deduce ... +-- ...Could not deduce... -- ... -- -- >>> apiLink (Proxy :: Proxy NotALink) -- ... --- Could not deduce ... +-- ...Could not deduce... -- ... -- -- sanity check diff --git a/stack-ghc-7.8.4.yaml b/stack-ghc-7.8.4.yaml index 679b2b52..23965e9f 100644 --- a/stack-ghc-7.8.4.yaml +++ b/stack-ghc-7.8.4.yaml @@ -5,7 +5,6 @@ packages: - servant-cassava/ - servant-client/ - servant-docs/ -- servant-examples/ - servant-foreign/ - servant-js/ - servant-lucid/ @@ -24,5 +23,5 @@ extra-deps: - stm-delay-0.1.1.1 - control-monad-omega-0.3.1 - http-api-data-0.1.1.1 -- should-not-typecheck-2.0.1 +- should-not-typecheck-2.1.0 resolver: lts-2.22 diff --git a/stack-ghc-8.0.1.yaml b/stack-ghc-8.0.1.yaml new file mode 100644 index 00000000..dcfb8e5f --- /dev/null +++ b/stack-ghc-8.0.1.yaml @@ -0,0 +1,166 @@ +flags: + time-locale-compat: + old-locale: false +packages: +- servant/ +- servant-blaze/ +- servant-cassava/ +- servant-client/ +- servant-docs/ +- servant-foreign/ +- servant-js/ +- servant-lucid/ +- servant-mock/ +- servant-server/ +setup-info: + ghc: + linux64: + 8.0.0.20160421: + url: https://downloads.haskell.org/~ghc/8.0.1-rc4/ghc-8.0.0.20160421-x86_64-unknown-linux.tar.xz + macosx: + 8.0.0.20160421: + url: https://downloads.haskell.org/~ghc/8.0.1-rc4/ghc-8.0.0.20160421-x86_64-apple-darwin.tar.xz +extra-deps: +- Diff-0.3.4 +- HUnit-1.3.1.1 +- QuickCheck-2.8.2 +- StateVar-1.1.0.4 +- adjunctions-4.3 +- aeson-0.11.2.0 +- aeson-pretty-0.7.2 +- ansi-terminal-0.6.2.3 +- ansi-wl-pprint-0.6.7.3 +- appar-0.1.4 +- asn1-encoding-0.9.3 +- asn1-parse-0.9.4 +- asn1-types-0.3.2 +- async-2.1.0 +- attoparsec-0.13.0.2 +- auto-update-0.1.4 +- base-compat-0.9.1 +- base-orphans-0.5.4 +- base64-bytestring-1.0.0.1 +- bifunctors-5.3 +- blaze-builder-0.4.0.2 +- blaze-html-0.8.1.1 +- blaze-markup-0.7.0.3 +- byteable-0.1.1 +- byteorder-1.0.4 +- bytestring-builder-0.10.6.0.0 +- bytestring-conversion-0.3.1 +- case-insensitive-1.2.0.6 +- cassava-0.4.5.0 +- cereal-0.5.1.0 +- charset-0.3.7.1 +- cmdargs-0.10.14 +- comonad-5 +- connection-0.2.5 +- contravariant-1.4 +- control-monad-omega-0.3.1 +- cookie-0.4.2 +- cryptonite-0.15 +- data-default-class-0.0.1 +- distributive-0.5.0.2 +- dlist-0.7.1.2 +- doctest-0.11.0 +- double-conversion-2.0.1.0 +- easy-file-0.2.1 +- exceptions-0.8.2.1 +- fail-4.9.0.0 +- fast-logger-2.4.6 +- file-embed-0.0.10 +- filemanip-0.3.6.3 +- free-4.12.4 +- ghc-paths-0.1.0.9 +- hashable-1.2.4.0 +- hex-0.1.2 +- hourglass-0.2.10 +- hspec-2.2.3 +- hspec-core-2.2.3 +- hspec-discover-2.2.3 +- hspec-expectations-0.7.2 +- hspec-wai-0.6.6 +- http-api-data-0.2.2 +- http-client-0.4.28 +- http-client-tls-0.2.4 +- http-date-0.0.6.1 +- http-media-0.6.3 +- http-types-0.9 +- http2-1.6.0 +- iproute-1.7.0 +- kan-extensions-5.0.1 +- language-ecmascript-0.17.1.0 +- lens-4.14 +- lifted-base-0.2.3.6 +- lucid-2.9.5 +- memory-0.12 +- mime-types-0.1.0.7 +- mmorph-1.0.6 +- monad-control-1.0.1.0 +- mtl-2.2.1 +- network-2.6.2.1 +- network-uri-2.6.1.0 +- old-locale-1.0.0.7 +- old-time-1.1.0.3 +- optparse-applicative-0.12.1.0 +- parallel-3.2.1.0 +- parsec-3.1.9 +- pem-0.2.2 +- prelude-extras-0.4.0.3 +- primitive-0.6.1.0 +- profunctors-5.2 +- psqueues-0.2.2.1 +- quickcheck-instances-0.3.12 +- quickcheck-io-0.1.2 +- random-1.1 +- reflection-2.1.2 +- resourcet-1.1.7.4 +- safe-0.3.9 +- scientific-0.3.4.6 +- semigroupoids-5.0.1 +- semigroups-0.18.1 +- setenv-0.1.1.3 +- should-not-typecheck-2.1.0 +- simple-sendfile-0.2.21 +- socks-0.5.5 +- split-0.2.3.1 +- stm-2.4.4.1 +- streaming-commons-0.1.15.4 +- string-conversions-0.4 +- stringsearch-0.3.6.6 +- syb-0.6 +- system-filepath-0.4.13.4 +- tagged-0.8.4 +- tagshare-0.0 +- temporary-1.2.0.4 +- testing-feat-0.4.0.3 +- text-1.2.2.1 +- tf-random-0.5 +- time-locale-compat-0.1.1.1 +- tls-1.3.7 +- transformers-base-0.4.4 +- transformers-compat-0.5.1.4 +- uniplate-1.6.12 +- unix-compat-0.4.1.4 +- unix-time-0.3.6 +- unordered-containers-0.2.7.0 +- url-2.1.3 +- utf8-string-1.0.1.1 +- vault-0.3.0.6 +- vector-0.11.0.0 +- void-0.7.1 +- wai-3.2.1 +- wai-app-static-3.1.5 +- wai-extra-3.0.15.1 +- wai-logger-2.2.7 +- warp-3.2.6 +- with-location-0.1.0 +- wl-pprint-1.2 +- word8-0.1.2 +- x509-1.6.3 +- x509-store-1.6.1 +- x509-system-1.6.3 +- x509-validation-1.6.3 +- zlib-0.6.1.1 +compiler-check: match-exact +resolver: ghc-8.0.0.20160421