git.iko.soy/typeable/servant
on master help sign in
Janitoring
9650631Julian K. Arni
servant-docs/servant-docs.cabal+1
@@ -65,6 +65,7 @@ executable greet-docs
65test-suite spec
65test-suite spec
66 type: exitcode-stdio-1.0
66 type: exitcode-stdio-1.0
67 main-is: Spec.hs
67 main-is: Spec.hs
68+ other-modules: Servant.DocsSpec
68 hs-source-dirs: test
69 hs-source-dirs: test
69 ghc-options: -Wall
70 ghc-options: -Wall
70 build-depends:
71 build-depends:
servant-docs/src/Servant/Docs/Internal.hs+10−8
@@ -23,19 +23,21 @@ module Servant.Docs.Internal where
23
23
24import Control.Applicative
24import Control.Applicative
25import Control.Arrow (second)
25import Control.Arrow (second)
26−import Control.Lens hiding (List, to, from)
26+import Control.Lens (makeLenses, over, traversed, (%~),
27+ (&), (.~), (<>~), (^.), _1, _2,
28+ _last, (|>))
27import qualified Control.Monad.Omega as Omega
29import qualified Control.Monad.Omega as Omega
28import Data.ByteString.Conversion (ToByteString, toByteString)
30import Data.ByteString.Conversion (ToByteString, toByteString)
29import Data.ByteString.Lazy.Char8 (ByteString)
31import Data.ByteString.Lazy.Char8 (ByteString)
30import qualified Data.CaseInsensitive as CI
32import qualified Data.CaseInsensitive as CI
31−import Data.Hashable
33+import Data.Hashable (Hashable)
32import Data.HashMap.Strict (HashMap)
34import Data.HashMap.Strict (HashMap)
33import Data.List
35import Data.List
34import Data.Maybe
36import Data.Maybe
35import Data.Monoid
37import Data.Monoid
36import Data.Ord (comparing)
38import Data.Ord (comparing)
37−import Data.Proxy
39+import Data.Proxy (Proxy(Proxy))
38−import Data.String.Conversions
40+import Data.String.Conversions (cs)
39import Data.Text (Text, pack, unpack)
41import Data.Text (Text, pack, unpack)
40import GHC.Exts (Constraint)
42import GHC.Exts (Constraint)
41import GHC.Generics
43import GHC.Generics
@@ -494,9 +496,9 @@ sampleByteStrings
494 -> Proxy a
496 -> Proxy a
495 -> [(Text, M.MediaType, ByteString)]
497 -> [(Text, M.MediaType, ByteString)]
496sampleByteStrings ctypes@Proxy Proxy =
498sampleByteStrings ctypes@Proxy Proxy =
497− let samples = toSamples (Proxy :: Proxy a)
499+ let samples' = toSamples (Proxy :: Proxy a)
498 enc (t, s) = uncurry (t,,) <$> allMimeRender ctypes s
500 enc (t, s) = uncurry (t,,) <$> allMimeRender ctypes s
499− in concatMap enc samples
501+ in concatMap enc samples'
500
502
501-- | Generate a list of 'MediaType' values describing the content types
503-- | Generate a list of 'MediaType' values describing the content types
502-- accepted by an API component.
504-- accepted by an API component.
@@ -640,10 +642,10 @@ markdown api = unlines $
640
642
641 rqbodyStr :: [M.MediaType] -> [(M.MediaType, ByteString)]-> [String]
643 rqbodyStr :: [M.MediaType] -> [(M.MediaType, ByteString)]-> [String]
642 rqbodyStr [] [] = []
644 rqbodyStr [] [] = []
643− rqbodyStr types samples =
645+ rqbodyStr types s =
644 ["#### Request:", ""]
646 ["#### Request:", ""]
645 <> formatTypes types
647 <> formatTypes types
646− <> concatMap formatBody samples
648+ <> concatMap formatBody s
647
649
648 formatTypes [] = []
650 formatTypes [] = []
649 formatTypes ts = ["- Supported content types are:", ""]
651 formatTypes ts = ["- Supported content types are:", ""]
servant-examples/auth-combinator/auth-combinator.hs+1
@@ -5,6 +5,7 @@
5{-# LANGUAGE ScopedTypeVariables #-}
5{-# LANGUAGE ScopedTypeVariables #-}
6{-# LANGUAGE TypeFamilies #-}
6{-# LANGUAGE TypeFamilies #-}
7{-# LANGUAGE TypeOperators #-}
7{-# LANGUAGE TypeOperators #-}
8+{-# OPTIONS_GHC -fno-warn-unused-binds #-}
8import Data.Aeson
9import Data.Aeson
9import Data.ByteString (ByteString)
10import Data.ByteString (ByteString)
10import Data.Text (Text)
11import Data.Text (Text)
servant-examples/hackage/hackage.hs+2
@@ -2,6 +2,8 @@
2{-# LANGUAGE DeriveGeneric #-}
2{-# LANGUAGE DeriveGeneric #-}
3{-# LANGUAGE OverloadedStrings #-}
3{-# LANGUAGE OverloadedStrings #-}
4{-# LANGUAGE TypeOperators #-}
4{-# LANGUAGE TypeOperators #-}
5+{-# OPTIONS_GHC -fno-warn-unused-binds #-}
6+{-# OPTIONS_GHC -fno-warn-unused-imports #-}
5import Control.Applicative
7import Control.Applicative
6import Control.Monad
8import Control.Monad
7import Control.Monad.IO.Class
9import Control.Monad.IO.Class
servant-examples/servant-examples.cabal+4
@@ -20,6 +20,7 @@ source-repository head
20executable tutorial
20executable tutorial
21 main-is: tutorial.hs
21 main-is: tutorial.hs
22 other-modules: T1, T2, T3, T4, T5, T6, T7, T8, T9, T10
22 other-modules: T1, T2, T3, T4, T5, T6, T7, T8, T9, T10
23+ ghc-options: -Wall -fno-warn-unused-binds -fno-warn-name-shadowing
23 build-depends:
24 build-depends:
24 aeson >= 0.8
25 aeson >= 0.8
25 , base >= 4.7 && < 5
26 , base >= 4.7 && < 5
@@ -45,8 +46,10 @@ executable tutorial
45
46
46executable t8-main
47executable t8-main
47 main-is: t8-main.hs
48 main-is: t8-main.hs
49+ other-modules: T3, T8
48 hs-source-dirs: tutorial
50 hs-source-dirs: tutorial
49 default-language: Haskell2010
51 default-language: Haskell2010
52+ ghc-options: -Wall -fno-warn-unused-binds -fno-warn-name-shadowing
50 build-depends:
53 build-depends:
51 aeson
54 aeson
52 , base >= 4.7 && < 5
55 , base >= 4.7 && < 5
@@ -101,6 +104,7 @@ executable auth-combinator
101
104
102executable socket-io-chat
105executable socket-io-chat
103 main-is: socket-io-chat.hs
106 main-is: socket-io-chat.hs
107+ other-modules: Chat
104 build-depends:
108 build-depends:
105 aeson >= 0.8
109 aeson >= 0.8
106 , base >= 4.7 && < 5
110 , base >= 4.7 && < 5
servant-examples/tutorial/T3.hs+1
@@ -2,6 +2,7 @@
2{-# LANGUAGE DeriveGeneric #-}
2{-# LANGUAGE DeriveGeneric #-}
3{-# LANGUAGE TypeFamilies #-}
3{-# LANGUAGE TypeFamilies #-}
4{-# LANGUAGE TypeOperators #-}
4{-# LANGUAGE TypeOperators #-}
5+{-# OPTIONS_GHC -fno-warn-unused-binds #-}
5module T3 where
6module T3 where
6
7
7import Control.Monad.Trans.Except
8import Control.Monad.Trans.Except
servant-js/servant-js.cabal+3
@@ -77,6 +77,9 @@ test-suite spec
77 hs-source-dirs: test
77 hs-source-dirs: test
78 ghc-options: -Wall
78 ghc-options: -Wall
79 main-is: Spec.hs
79 main-is: Spec.hs
80+ other-modules:
81+ Servant.JSSpec
82+ Servant.JSSpec.CustomHeaders
80 build-depends: base
83 build-depends: base
81 , hspec >= 2.1.8
84 , hspec >= 2.1.8
82 , hspec-expectations
85 , hspec-expectations
servant-js/src/Servant/JS/Internal.hs+2−1
@@ -1,3 +1,4 @@
1+<<<<<<< HEAD
1module Servant.JS.Internal
2module Servant.JS.Internal
2 ( JavaScriptGenerator
3 ( JavaScriptGenerator
3 , CommonGeneratorOptions(..)
4 , CommonGeneratorOptions(..)
@@ -29,7 +30,7 @@ module Servant.JS.Internal
29 , Get
30 , Get
30 , Raw
31 , Raw
31 , Header
32 , Header
32− ) where
33+ ) where
33
34
34import Control.Lens hiding (List)
35import Control.Lens hiding (List)
35import qualified Data.CharSet as Set
36import qualified Data.CharSet as Set
servant-mock/src/Servant/Mock.hs+2−1
@@ -5,6 +5,7 @@
5{-# LANGUAGE ScopedTypeVariables #-}
5{-# LANGUAGE ScopedTypeVariables #-}
6{-# LANGUAGE TypeFamilies #-}
6{-# LANGUAGE TypeFamilies #-}
7{-# LANGUAGE TypeOperators #-}
7{-# LANGUAGE TypeOperators #-}
8+{-# OPTIONS_GHC -fno-warn-orphans #-}
8-- |
9-- |
9-- Module : Servant.Mock
10-- Module : Servant.Mock
10-- Copyright : 2015 Alp Mestanogullari
11-- Copyright : 2015 Alp Mestanogullari
@@ -165,7 +166,7 @@ instance (Arbitrary a, AllCTRender ctypes a) => HasMock (Put ctypes a) where
165 mock _ = mockArbitrary
166 mock _ = mockArbitrary
166
167
167instance HasMock Raw where
168instance HasMock Raw where
168− mock _ = \req respond -> do
169+ mock _ = \_req respond -> do
169 bdy <- genBody
170 bdy <- genBody
170 respond $ responseLBS status200 [] bdy
171 respond $ responseLBS status200 [] bdy
171
172
servant-server/servant-server.cabal+5
@@ -91,6 +91,11 @@ test-suite spec
91 default-language: Haskell2010
91 default-language: Haskell2010
92 hs-source-dirs: test
92 hs-source-dirs: test
93 main-is: Spec.hs
93 main-is: Spec.hs
94+ other-modules:
95+ Servant.Server.ErrorSpec
96+ Servant.Server.Internal.EnterSpec
97+ Servant.ServerSpec
98+ Servant.Utils.StaticFilesSpec
94 build-depends:
99 build-depends:
95 base == 4.*
100 base == 4.*
96 , aeson
101 , aeson
servant/servant.cabal+5
@@ -90,6 +90,11 @@ test-suite spec
90 default-language: Haskell2010
90 default-language: Haskell2010
91 hs-source-dirs: test
91 hs-source-dirs: test
92 main-is: Spec.hs
92 main-is: Spec.hs
93+ other-modules:
94+ Servant.API.ContentTypesSpec
95+ Servant.API.ResponseHeadersSpec
96+ Servant.Common.TextSpec
97+ Servant.Utils.LinksSpec
93 build-depends:
98 build-depends:
94 base == 4.*
99 base == 4.*
95 , aeson
100 , aeson
stack.yaml+2
@@ -1,6 +1,8 @@
1flags:
1flags:
2 servant-js:
2 servant-js:
3 example: false
3 example: false
4+ghc-options:
5+ "*": -Wall
4packages:
6packages:
5- servant/
7- servant/
6- servant-blaze/
8- servant-blaze/