Review fixes
This commit is contained in:
parent
7cdebce96b
commit
501212e6b9
5 changed files with 9 additions and 20 deletions
|
@ -41,7 +41,7 @@ library
|
||||||
, base64-bytestring >= 1.0.0.1 && < 1.1
|
, base64-bytestring >= 1.0.0.1 && < 1.1
|
||||||
, bytestring >= 0.10 && < 0.11
|
, bytestring >= 0.10 && < 0.11
|
||||||
, exceptions >= 0.8 && < 0.9
|
, exceptions >= 0.8 && < 0.9
|
||||||
, http-api-data >= 0.1 && < 0.4
|
, http-api-data >= 0.3 && < 0.4
|
||||||
, http-client >= 0.4.18.1 && < 0.6
|
, http-client >= 0.4.18.1 && < 0.6
|
||||||
, http-client-tls >= 0.2.2 && < 0.4
|
, http-client-tls >= 0.2.2 && < 0.4
|
||||||
, http-media >= 0.6.2 && < 0.7
|
, http-media >= 0.6.2 && < 0.7
|
||||||
|
|
|
@ -30,7 +30,7 @@ module Servant.ClientSpec where
|
||||||
import Control.Applicative ((<$>))
|
import Control.Applicative ((<$>))
|
||||||
#endif
|
#endif
|
||||||
import Control.Arrow (left)
|
import Control.Arrow (left)
|
||||||
import Control.Concurrent (ThreadId, forkIO, killThread)
|
import Control.Concurrent (forkIO, killThread, ThreadId)
|
||||||
import Control.Exception (bracket)
|
import Control.Exception (bracket)
|
||||||
import Control.Monad.Trans.Except (throwE )
|
import Control.Monad.Trans.Except (throwE )
|
||||||
import Data.Aeson
|
import Data.Aeson
|
||||||
|
@ -44,8 +44,7 @@ import qualified Network.HTTP.Client as C
|
||||||
import Network.HTTP.Media
|
import Network.HTTP.Media
|
||||||
import qualified Network.HTTP.Types as HTTP
|
import qualified Network.HTTP.Types as HTTP
|
||||||
import Network.Socket
|
import Network.Socket
|
||||||
import Network.Wai (Request, requestHeaders,
|
import Network.Wai (Request, requestHeaders, responseLBS)
|
||||||
responseLBS)
|
|
||||||
import Network.Wai.Handler.Warp
|
import Network.Wai.Handler.Warp
|
||||||
import System.IO.Unsafe (unsafePerformIO)
|
import System.IO.Unsafe (unsafePerformIO)
|
||||||
import Test.Hspec
|
import Test.Hspec
|
||||||
|
|
|
@ -52,7 +52,7 @@ library
|
||||||
, base64-bytestring >= 1.0 && < 1.1
|
, base64-bytestring >= 1.0 && < 1.1
|
||||||
, bytestring >= 0.10 && < 0.11
|
, bytestring >= 0.10 && < 0.11
|
||||||
, containers >= 0.5 && < 0.6
|
, containers >= 0.5 && < 0.6
|
||||||
, http-api-data >= 0.1 && < 0.4
|
, http-api-data >= 0.3 && < 0.4
|
||||||
, http-types >= 0.8 && < 0.10
|
, http-types >= 0.8 && < 0.10
|
||||||
, network-uri >= 2.6 && < 2.7
|
, network-uri >= 2.6 && < 2.7
|
||||||
, mtl >= 2 && < 2.3
|
, mtl >= 2 && < 2.3
|
||||||
|
|
|
@ -42,19 +42,10 @@ import Network.Wai (Application, Request, Response,
|
||||||
responseLBS, vault)
|
responseLBS, vault)
|
||||||
import Prelude ()
|
import Prelude ()
|
||||||
import Prelude.Compat
|
import Prelude.Compat
|
||||||
import Web.HttpApiData (FromHttpApiData)
|
import Web.HttpApiData (FromHttpApiData, parseHeaderMaybe,
|
||||||
#if MIN_VERSION_http_api_data(0,3,0)
|
|
||||||
import Web.Internal.HttpApiData (parseHeaderMaybe,
|
|
||||||
parseQueryParamMaybe,
|
parseQueryParamMaybe,
|
||||||
parseUrlPieceMaybe,
|
parseUrlPieceMaybe,
|
||||||
parseUrlPieces)
|
parseUrlPieces)
|
||||||
#else
|
|
||||||
import Web.HttpApiData.Internal (parseHeaderMaybe,
|
|
||||||
parseQueryParamMaybe,
|
|
||||||
parseUrlPieceMaybe,
|
|
||||||
parseUrlPieces)
|
|
||||||
#endif
|
|
||||||
|
|
||||||
import Servant.API ((:<|>) (..), (:>), BasicAuth, Capture,
|
import Servant.API ((:<|>) (..), (:>), BasicAuth, Capture,
|
||||||
CaptureAll, Verb,
|
CaptureAll, Verb,
|
||||||
ReflectMethod(reflectMethod),
|
ReflectMethod(reflectMethod),
|
||||||
|
|
|
@ -72,8 +72,7 @@ module Servant.API.ContentTypes
|
||||||
|
|
||||||
import Control.Arrow (left)
|
import Control.Arrow (left)
|
||||||
import Control.Monad.Compat
|
import Control.Monad.Compat
|
||||||
import Data.Aeson (FromJSON (..), ToJSON (..),
|
import Data.Aeson (FromJSON(..), ToJSON(..), encode)
|
||||||
encode)
|
|
||||||
import Data.Aeson.Parser (value)
|
import Data.Aeson.Parser (value)
|
||||||
import Data.Aeson.Types (parseEither)
|
import Data.Aeson.Types (parseEither)
|
||||||
import Data.Attoparsec.ByteString.Char8 (endOfInput, parseOnly,
|
import Data.Attoparsec.ByteString.Char8 (endOfInput, parseOnly,
|
||||||
|
@ -288,7 +287,7 @@ instance OVERLAPPABLE_
|
||||||
ToJSON a => MimeRender JSON a where
|
ToJSON a => MimeRender JSON a where
|
||||||
mimeRender _ = encode
|
mimeRender _ = encode
|
||||||
|
|
||||||
-- | @urlEncodeAsForm"
|
-- | @urlEncodeAsForm@
|
||||||
-- Note that the @mimeUnrender p (mimeRender p x) == Right x@ law only
|
-- Note that the @mimeUnrender p (mimeRender p x) == Right x@ law only
|
||||||
-- holds if every element of x is non-null (i.e., not @("", "")@)
|
-- holds if every element of x is non-null (i.e., not @("", "")@)
|
||||||
instance OVERLAPPABLE_
|
instance OVERLAPPABLE_
|
||||||
|
|
Loading…
Reference in a new issue