git.iko.soy/typeable/servant
on master help sign in
travis: enable -Wall -Werror
commitb26bbfccdaef5734ae62b07df14706e4294b13b0 authorSönke Hahn <soenkehahn@gmail.com> dateMon 18 Apr 2016, 18:07 (10 years ago) parent555038c
21 files changed+30−31
doc/tutorial/tutorial.cabal+2−6 servant-blaze/servant-blaze.cabal+1 servant-cassava/servant-cassava.cabal+1 servant-client/servant-client.cabal+1−2 servant-client/test/Servant/ClientSpec.hs+1−1 servant-docs/servant-docs.cabal−1 servant-foreign/src/Servant/Foreign/Internal.hs+2−1 servant-js/servant-js.cabal+1−1 servant-js/src/Servant/JS/Internal.hs+1−1 servant-lucid/servant-lucid.cabal+1 servant-mock/example/main.hs+3 servant-mock/servant-mock.cabal+3−2 servant-server/servant-server.cabal+2−3 servant-server/test/Servant/Server/Internal/ContextSpec.hs+5−4 servant-server/test/Servant/Server/Internal/EnterSpec.hs−1 servant-server/test/Servant/Server/RouterSpec.hs+1 servant-server/test/Servant/Server/StreamingSpec.hs−1 servant-server/test/Servant/Server/UsingContextSpec.hs−1 servant-server/test/Servant/Server/UsingContextSpec/TestCombinators.hs+2−2 servant/servant.cabal+2−3 travis.sh+1−1
doc/tutorial/tutorial.cabal+2−6
@@ -46,15 +46,11 @@ library
4646 , markdown-unlit >= 0.4
4747 , http-client
4848 default-language: Haskell2010
49− ghc-options: -Wall -Werror -pgmL markdown-unlit
50− -- to silence aeson-0.10 warnings:
51− ghc-options: -fno-warn-missing-methods
52− ghc-options: -fno-warn-name-shadowing
49+ ghc-options: -Wall -pgmL markdown-unlit
5350
5451test-suite spec
5552 type: exitcode-stdio-1.0
56− ghc-options:
57− -Wall -fno-warn-name-shadowing -fno-warn-missing-signatures
53+ ghc-options: -Wall
5854 default-language: Haskell2010
5955 hs-source-dirs: test
6056 main-is: Spec.hs
servant-blaze/servant-blaze.cabal+1
@@ -31,3 +31,4 @@ library
3131 hs-source-dirs: src
3232 default-language: Haskell2010
3333 include-dirs: include
34+ ghc-options: -Wall
servant-cassava/servant-cassava.cabal+1
@@ -28,3 +28,4 @@ library
2828 hs-source-dirs: src
2929 default-language: Haskell2010
3030 include-dirs: include
31+ ghc-options: -Wall
servant-client/servant-client.cabal+1−2
@@ -60,8 +60,7 @@ library
6060
6161test-suite spec
6262 type: exitcode-stdio-1.0
63− ghc-options:
64− -Wall -fno-warn-name-shadowing -fno-warn-missing-signatures
63+ ghc-options: -Wall
6564 default-language: Haskell2010
6665 hs-source-dirs: test
6766 main-is: Spec.hs
servant-client/test/Servant/ClientSpec.hs+1−1
@@ -28,7 +28,7 @@ import Control.Applicative ((<$>))
2828import Control.Arrow (left)
2929import Control.Concurrent (forkIO, killThread, ThreadId)
3030import Control.Exception (bracket)
31−import Control.Monad.Trans.Except (ExceptT, throwE, runExceptT)
31+import Control.Monad.Trans.Except (throwE, runExceptT)
3232import Data.Aeson
3333import qualified Data.ByteString.Lazy as BS
3434import Data.Char (chr, isPrint)
servant-docs/servant-docs.cabal−1
@@ -82,4 +82,3 @@ test-suite spec
8282 , servant-docs
8383 , string-conversions
8484 default-language: Haskell2010
85−
servant-foreign/src/Servant/Foreign/Internal.hs+2−1
@@ -7,7 +7,8 @@
77-- arbitrary programming languages.
88module Servant.Foreign.Internal where
99
10−import Control.Lens hiding (cons, List)
10+import Control.Lens (makePrisms, makeLenses, Getter, (&), (<>~), (%~),
11+ (.~))
1112#if !MIN_VERSION_base(4,8,0)
1213import Data.Monoid
1314#endif
servant-js/servant-js.cabal+1−1
@@ -55,7 +55,7 @@ library
5555
5656executable counter
5757 main-is: counter.hs
58− ghc-options: -O2 -Wall
58+ ghc-options: -Wall
5959 hs-source-dirs: examples
6060
6161 if flag(example)
servant-js/src/Servant/JS/Internal.hs+1−1
@@ -46,7 +46,7 @@ module Servant.JS.Internal
4646 , Header
4747 ) where
4848
49−import Control.Lens hiding (List)
49+import Control.Lens ((^.))
5050import qualified Data.CharSet as Set
5151import qualified Data.CharSet.Unicode.Category as Set
5252import Data.Monoid
servant-lucid/servant-lucid.cabal+1
@@ -31,3 +31,4 @@ library
3131 hs-source-dirs: src
3232 default-language: Haskell2010
3333 include-dirs: include
34+ ghc-options: -Wall
servant-mock/example/main.hs+3
@@ -2,6 +2,9 @@
22{-# LANGUAGE DeriveGeneric #-}
33{-# LANGUAGE GeneralizedNewtypeDeriving #-}
44{-# LANGUAGE TypeOperators #-}
5+
6+{-# OPTIONS_GHC -fno-warn-unused-binds #-}
7+
58import Data.Aeson
69import GHC.Generics
710import Network.Wai.Handler.Warp
servant-mock/servant-mock.cabal+3−2
@@ -35,6 +35,7 @@ library
3535 hs-source-dirs: src
3636 default-language: Haskell2010
3737 include-dirs: include
38+ ghc-options: -Wall
3839
3940executable mock-app
4041 main-is: main.hs
@@ -45,11 +46,11 @@ executable mock-app
4546 buildable: True
4647 else
4748 buildable: False
49+ ghc-options: -Wall
4850
4951test-suite spec
5052 type: exitcode-stdio-1.0
51− ghc-options:
52− -Wall -fno-warn-name-shadowing
53+ ghc-options: -Wall
5354 default-language: Haskell2010
5455 hs-source-dirs: test
5556 main-is: Spec.hs
servant-server/servant-server.cabal+2−3
@@ -94,8 +94,7 @@ executable greet
9494
9595test-suite spec
9696 type: exitcode-stdio-1.0
97− ghc-options:
98− -Wall -fno-warn-name-shadowing -fno-warn-missing-signatures
97+ ghc-options: -Wall
9998 default-language: Haskell2010
10099 hs-source-dirs: test
101100 main-is: Spec.hs
@@ -147,5 +146,5 @@ test-suite doctests
147146 main-is: test/Doctests.hs
148147 buildable: True
149148 default-language: Haskell2010
150− ghc-options: -threaded
149+ ghc-options: -Wall -threaded
151150 include-dirs: include
servant-server/test/Servant/Server/Internal/ContextSpec.hs+5−4
@@ -1,9 +1,9 @@
11{-# LANGUAGE DataKinds #-}
2−{-# OPTIONS_GHC -fdefer-type-errors #-}
2+{-# OPTIONS_GHC -fdefer-type-errors -Wwarn #-}
33module Servant.Server.Internal.ContextSpec (spec) where
44
55import Data.Proxy (Proxy (..))
6−import Test.Hspec (Spec, describe, it, shouldBe, pending, context)
6+import Test.Hspec (Spec, describe, it, shouldBe, context)
77import Test.ShouldNotTypecheck (shouldNotTypecheck)
88
99import Servant.API
@@ -26,16 +26,17 @@ spec = do
2626 shouldNotTypecheck x
2727
2828 context "Show instance" $ do
29− let cxt = 'a' :. True :. EmptyContext
3029 it "has a Show instance" $ do
30+ let cxt = 'a' :. True :. EmptyContext
3131 show cxt `shouldBe` "'a' :. True :. EmptyContext"
3232
3333 context "bracketing" $ do
3434 it "works" $ do
35+ let cxt = 'a' :. True :. EmptyContext
3536 show (Just cxt) `shouldBe` "Just ('a' :. True :. EmptyContext)"
3637
3738 it "works with operators" $ do
38− let cxt = (1 :. 'a' :. EmptyContext) :<|> ('b' :. True :. EmptyContext)
39+ let cxt = ((1 :: Integer) :. 'a' :. EmptyContext) :<|> ('b' :. True :. EmptyContext)
3940 show cxt `shouldBe` "(1 :. 'a' :. EmptyContext) :<|> ('b' :. True :. EmptyContext)"
4041
4142 describe "descendIntoNamedContext" $ do
servant-server/test/Servant/Server/Internal/EnterSpec.hs−1
@@ -5,7 +5,6 @@ module Servant.Server.Internal.EnterSpec where
55
66import qualified Control.Category as C
77import Control.Monad.Reader
8−import Control.Monad.Trans.Except
98import Data.Proxy
109import Servant.API
1110import Servant.Server
servant-server/test/Servant/Server/RouterSpec.hs+1
@@ -16,6 +16,7 @@ import Servant.API
1616import Servant.Server
1717import Servant.Server.Internal
1818
19+spec :: Spec
1920spec = describe "Servant.Server.Internal.Router" $ do
2021 routerSpec
2122 distributivitySpec
servant-server/test/Servant/Server/StreamingSpec.hs−1
@@ -11,7 +11,6 @@ module Servant.Server.StreamingSpec where
1111import Control.Concurrent
1212import Control.Exception hiding (Handler)
1313import Control.Monad.IO.Class
14−import Control.Monad.Trans.Except
1514import qualified Data.ByteString as Strict
1615import qualified Data.ByteString.Lazy as Lazy
1716import Network.HTTP.Types
servant-server/test/Servant/Server/UsingContextSpec.hs−1
@@ -5,7 +5,6 @@
55
66module Servant.Server.UsingContextSpec where
77
8−import Control.Monad.Trans.Except
98import Network.Wai
109import Test.Hspec (Spec, describe, it)
1110import Test.Hspec.Wai
servant-server/test/Servant/Server/UsingContextSpec/TestCombinators.hs+2−2
@@ -30,12 +30,12 @@ instance (HasContextEntry context String, HasServer subApi context) =>
3030 String -> ServerT subApi m
3131
3232 route Proxy context delayed =
33− route subProxy context (fmap (inject context) delayed)
33+ route subProxy context (fmap inject delayed)
3434 where
3535 subProxy :: Proxy subApi
3636 subProxy = Proxy
3737
38− inject context f = f (getContextEntry context)
38+ inject f = f (getContextEntry context)
3939
4040data InjectIntoContext
4141
servant/servant.cabal+2−3
@@ -89,8 +89,7 @@ library
8989
9090test-suite spec
9191 type: exitcode-stdio-1.0
92− ghc-options:
93− -Wall -fno-warn-name-shadowing -fno-warn-missing-signatures
92+ ghc-options: -Wall
9493 default-language: Haskell2010
9594 hs-source-dirs: test
9695 main-is: Spec.hs
@@ -122,5 +121,5 @@ test-suite doctests
122121 main-is: test/Doctests.hs
123122 buildable: True
124123 default-language: Haskell2010
125− ghc-options: -threaded
124+ ghc-options: -Wall -threaded
126125 include-dirs: include
travis.sh+1−1
@@ -6,7 +6,7 @@ for package in $(cat sources.txt) doc/tutorial ; do
66 echo testing $package
77 pushd $package
88 tinc
9− cabal configure --enable-tests --disable-optimization
9+ cabal configure --enable-tests --disable-optimization --ghc-options='-Werror'
1010 cabal build
1111 cabal test
1212 popd