From c60588ade1898322c8974807cc9a723fb42928a5 Mon Sep 17 00:00:00 2001 From: "Julian K. Arni" Date: Wed, 23 Sep 2015 15:48:41 +0200 Subject: [PATCH] Make no-warn-missing-methods a test-all flag. --- scripts/test-all.sh | 3 ++- servant-client/test/Servant/ClientSpec.hs | 1 - servant-docs/example/greet.hs | 1 - servant-docs/test/Servant/DocsSpec.hs | 1 - servant-examples/auth-combinator/auth-combinator.hs | 1 - servant-examples/tutorial/T1.hs | 1 - servant-examples/tutorial/T2.hs | 1 - servant-examples/tutorial/T3.hs | 1 - servant-examples/tutorial/T4.hs | 1 - servant-examples/tutorial/T5.hs | 1 - servant-examples/tutorial/T8.hs | 1 - servant-examples/tutorial/T9.hs | 1 - servant-examples/wai-middleware/wai-middleware.hs | 1 - servant-server/example/greet.hs | 1 - servant/test/Servant/API/ContentTypesSpec.hs | 1 - stack.yaml | 1 + 16 files changed, 3 insertions(+), 15 deletions(-) diff --git a/scripts/test-all.sh b/scripts/test-all.sh index 5c78312c..c617ad7e 100755 --- a/scripts/test-all.sh +++ b/scripts/test-all.sh @@ -17,7 +17,8 @@ set -o errexit DIR=$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd ) . "$DIR"/lib/common.sh -GHC_FLAGS="-Werror" +# TODO: Remove missing-methods after https://github.com/bos/aeson/issues/290 +GHC_FLAGS="-Werror -fno-warn-missing-methods" prepare_sandbox () { $CABAL sandbox init diff --git a/servant-client/test/Servant/ClientSpec.hs b/servant-client/test/Servant/ClientSpec.hs index 1a8ea875..242a3620 100644 --- a/servant-client/test/Servant/ClientSpec.hs +++ b/servant-client/test/Servant/ClientSpec.hs @@ -9,7 +9,6 @@ {-# LANGUAGE TypeOperators #-} {-# OPTIONS_GHC -fcontext-stack=100 #-} {-# OPTIONS_GHC -fno-warn-orphans #-} -{-# OPTIONS_GHC -fno-warn-missing-methods #-} module Servant.ClientSpec where diff --git a/servant-docs/example/greet.hs b/servant-docs/example/greet.hs index c60a86e5..1835b290 100644 --- a/servant-docs/example/greet.hs +++ b/servant-docs/example/greet.hs @@ -5,7 +5,6 @@ {-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE TypeOperators #-} {-# OPTIONS_GHC -fno-warn-orphans #-} -{-# OPTIONS_GHC -fno-warn-missing-methods #-} import Control.Lens import Data.Aeson import Data.Proxy diff --git a/servant-docs/test/Servant/DocsSpec.hs b/servant-docs/test/Servant/DocsSpec.hs index ef2bbeb9..9da66448 100644 --- a/servant-docs/test/Servant/DocsSpec.hs +++ b/servant-docs/test/Servant/DocsSpec.hs @@ -5,7 +5,6 @@ {-# LANGUAGE TypeOperators #-} {-# LANGUAGE TypeSynonymInstances #-} {-# OPTIONS_GHC -fno-warn-orphans #-} -{-# OPTIONS_GHC -fno-warn-missing-methods #-} module Servant.DocsSpec where import Control.Lens diff --git a/servant-examples/auth-combinator/auth-combinator.hs b/servant-examples/auth-combinator/auth-combinator.hs index 0f9b4840..8bfe12dc 100644 --- a/servant-examples/auth-combinator/auth-combinator.hs +++ b/servant-examples/auth-combinator/auth-combinator.hs @@ -5,7 +5,6 @@ {-# LANGUAGE FlexibleInstances #-} {-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE ScopedTypeVariables #-} -{-# OPTIONS_GHC -fno-warn-missing-methods #-} {-# OPTIONS_GHC -fno-warn-unused-binds #-} import Data.Aeson import Data.ByteString (ByteString) diff --git a/servant-examples/tutorial/T1.hs b/servant-examples/tutorial/T1.hs index ee386725..d7cd396f 100644 --- a/servant-examples/tutorial/T1.hs +++ b/servant-examples/tutorial/T1.hs @@ -2,7 +2,6 @@ {-# LANGUAGE TypeFamilies #-} {-# LANGUAGE DeriveGeneric #-} {-# LANGUAGE TypeOperators #-} -{-# OPTIONS_GHC -fno-warn-missing-methods #-} module T1 where import Data.Aeson diff --git a/servant-examples/tutorial/T2.hs b/servant-examples/tutorial/T2.hs index 39659462..c68772c8 100644 --- a/servant-examples/tutorial/T2.hs +++ b/servant-examples/tutorial/T2.hs @@ -2,7 +2,6 @@ {-# LANGUAGE TypeFamilies #-} {-# LANGUAGE DeriveGeneric #-} {-# LANGUAGE TypeOperators #-} -{-# OPTIONS_GHC -fno-warn-missing-methods #-} module T2 where import Data.Aeson diff --git a/servant-examples/tutorial/T3.hs b/servant-examples/tutorial/T3.hs index b3cf0809..c93a214a 100644 --- a/servant-examples/tutorial/T3.hs +++ b/servant-examples/tutorial/T3.hs @@ -2,7 +2,6 @@ {-# LANGUAGE TypeFamilies #-} {-# LANGUAGE DeriveGeneric #-} {-# LANGUAGE TypeOperators #-} -{-# OPTIONS_GHC -fno-warn-missing-methods #-} module T3 where import Control.Monad.Trans.Either diff --git a/servant-examples/tutorial/T4.hs b/servant-examples/tutorial/T4.hs index 8ae6161e..7b2ba319 100644 --- a/servant-examples/tutorial/T4.hs +++ b/servant-examples/tutorial/T4.hs @@ -5,7 +5,6 @@ {-# LANGUAGE FlexibleInstances #-} {-# LANGUAGE OverloadedStrings #-} {-# OPTIONS_GHC -fno-warn-unused-imports #-} -{-# OPTIONS_GHC -fno-warn-missing-methods #-} module T4 where import Data.Aeson diff --git a/servant-examples/tutorial/T5.hs b/servant-examples/tutorial/T5.hs index de238a76..0811fd9b 100644 --- a/servant-examples/tutorial/T5.hs +++ b/servant-examples/tutorial/T5.hs @@ -3,7 +3,6 @@ {-# LANGUAGE DeriveGeneric #-} {-# LANGUAGE TypeOperators #-} {-# LANGUAGE OverloadedStrings #-} -{-# OPTIONS_GHC -fno-warn-missing-methods #-} module T5 where import Control.Monad.IO.Class diff --git a/servant-examples/tutorial/T8.hs b/servant-examples/tutorial/T8.hs index 91af6f63..0dcb29b0 100644 --- a/servant-examples/tutorial/T8.hs +++ b/servant-examples/tutorial/T8.hs @@ -2,7 +2,6 @@ {-# LANGUAGE TypeFamilies #-} {-# LANGUAGE TypeOperators #-} {-# OPTIONS_GHC -fno-warn-name-shadowing #-} -{-# OPTIONS_GHC -fno-warn-missing-methods #-} module T8 where import Control.Monad.Trans.Either diff --git a/servant-examples/tutorial/T9.hs b/servant-examples/tutorial/T9.hs index 1f120c09..2103c502 100644 --- a/servant-examples/tutorial/T9.hs +++ b/servant-examples/tutorial/T9.hs @@ -4,7 +4,6 @@ {-# LANGUAGE TypeOperators #-} {-# LANGUAGE OverloadedStrings #-} {-# OPTIONS_GHC -fno-warn-unused-imports #-} -{-# OPTIONS_GHC -fno-warn-missing-methods #-} module T9 where import Control.Applicative diff --git a/servant-examples/wai-middleware/wai-middleware.hs b/servant-examples/wai-middleware/wai-middleware.hs index 737045c2..207c0da1 100644 --- a/servant-examples/wai-middleware/wai-middleware.hs +++ b/servant-examples/wai-middleware/wai-middleware.hs @@ -2,7 +2,6 @@ {-# LANGUAGE DeriveGeneric #-} {-# LANGUAGE OverloadedStrings #-} {-# OPTIONS_GHC -fno-warn-unused-binds #-} -{-# OPTIONS_GHC -fno-warn-missing-methods #-} import Data.Aeson import Data.Text import GHC.Generics diff --git a/servant-server/example/greet.hs b/servant-server/example/greet.hs index 0e5fdb98..cd8bd138 100644 --- a/servant-server/example/greet.hs +++ b/servant-server/example/greet.hs @@ -4,7 +4,6 @@ {-# LANGUAGE DeriveGeneric #-} {-# LANGUAGE TypeOperators #-} {-# LANGUAGE OverloadedStrings #-} -{-# OPTIONS_GHC -fno-warn-missing-methods #-} import Data.Aeson import Data.Monoid diff --git a/servant/test/Servant/API/ContentTypesSpec.hs b/servant/test/Servant/API/ContentTypesSpec.hs index d55ced1c..f324c2b1 100644 --- a/servant/test/Servant/API/ContentTypesSpec.hs +++ b/servant/test/Servant/API/ContentTypesSpec.hs @@ -4,7 +4,6 @@ {-# LANGUAGE MultiParamTypeClasses #-} {-# LANGUAGE OverloadedStrings #-} {-# OPTIONS_GHC -fno-warn-orphans #-} -{-# OPTIONS_GHC -fno-warn-missing-methods #-} module Servant.API.ContentTypesSpec where diff --git a/stack.yaml b/stack.yaml index 55023b87..ecfc3dad 100644 --- a/stack.yaml +++ b/stack.yaml @@ -11,4 +11,5 @@ packages: extra-deps: - engine-io-wai-1.0.2 - attoparsec-0.13.0.1 +- aeson-0.10.0.0 resolver: nightly-2015-07-24