Re-export Web.FormUrlEncoded from Servant.API

This commit is contained in:
Erik Aker 2020-01-18 22:04:24 -08:00
parent cee0763507
commit 75da485e0f
7 changed files with 8 additions and 14 deletions

View file

@ -79,7 +79,6 @@ library
, base64-bytestring >= 1.0.0.1 && < 1.1 , base64-bytestring >= 1.0.0.1 && < 1.1
, exceptions >= 0.10.0 && < 0.11 , exceptions >= 0.10.0 && < 0.11
, free >= 5.1 && < 5.2 , free >= 5.1 && < 5.2
, http-api-data >= 0.4 && < 0.4.2
, http-media >= 0.7.1.3 && < 0.9 , http-media >= 0.7.1.3 && < 0.9
, http-types >= 0.12.2 && < 0.13 , http-types >= 0.12.2 && < 0.13
, network-uri >= 2.6.1.0 && < 2.7 , network-uri >= 2.6.1.0 && < 2.7

View file

@ -49,7 +49,7 @@ import Servant.API
IsSecure, MimeRender (mimeRender), IsSecure, MimeRender (mimeRender),
MimeUnrender (mimeUnrender), NoContent (NoContent), QueryFlag, MimeUnrender (mimeUnrender), NoContent (NoContent), QueryFlag,
QueryParam', QueryParams, QueryParamForm', Raw, ReflectMethod (..), RemoteHost, QueryParam', QueryParams, QueryParamForm', Raw, ReflectMethod (..), RemoteHost,
ReqBody', SBoolI, Stream, StreamBody', Summary, ToHttpApiData, ReqBody', SBoolI, Stream, StreamBody', Summary, ToHttpApiData, ToForm (..),
ToSourceIO (..), Vault, Verb, NoContentVerb, WithNamedContext, ToSourceIO (..), Vault, Verb, NoContentVerb, WithNamedContext,
contentType, getHeadersHList, getResponse, toQueryParam, contentType, getHeadersHList, getResponse, toQueryParam,
toUrlPiece) toUrlPiece)
@ -57,8 +57,6 @@ import Servant.API.ContentTypes
(contentTypes) (contentTypes)
import Servant.API.Modifiers import Servant.API.Modifiers
(FoldRequired, RequiredArgument, foldRequiredArgument) (FoldRequired, RequiredArgument, foldRequiredArgument)
import Web.FormUrlEncoded
(ToForm (..))
import Servant.Client.Core.Auth import Servant.Client.Core.Auth
import Servant.Client.Core.BasicAuth import Servant.Client.Core.BasicAuth

View file

@ -53,9 +53,8 @@ import Network.HTTP.Types
(Header, HeaderName, HttpVersion (..), Method, QueryItem, (Header, HeaderName, HttpVersion (..), Method, QueryItem,
http11, methodGet) http11, methodGet)
import Servant.API import Servant.API
(ToHttpApiData, toEncodedUrlPiece, toHeader, SourceIO) (ToHttpApiData, toEncodedUrlPiece, toHeader, SourceIO,
import Web.FormUrlEncoded ToForm (..), toListStable)
(ToForm (..), toListStable)
import Servant.Client.Core.Internal (mediaTypeRnf) import Servant.Client.Core.Internal (mediaTypeRnf)

View file

@ -62,7 +62,6 @@ library
, base-compat >= 0.10.5 && < 0.12 , base-compat >= 0.10.5 && < 0.12
, case-insensitive >= 1.2.0.11 && < 1.3 , case-insensitive >= 1.2.0.11 && < 1.3
, hashable >= 1.2.7.0 && < 1.4 , hashable >= 1.2.7.0 && < 1.4
, http-api-data >= 0.4 && < 0.4.2
, http-media >= 0.7.1.3 && < 0.9 , http-media >= 0.7.1.3 && < 0.9
, http-types >= 0.12.2 && < 0.13 , http-types >= 0.12.2 && < 0.13
, lens >= 4.17 && < 4.19 , lens >= 4.17 && < 4.19
@ -101,7 +100,6 @@ test-suite spec
base base
, base-compat , base-compat
, aeson , aeson
, http-api-data
, lens , lens
, servant , servant
, servant-docs , servant-docs

View file

@ -64,8 +64,6 @@ import GHC.TypeLits
import Servant.API import Servant.API
import Servant.API.ContentTypes import Servant.API.ContentTypes
import Servant.API.TypeLevel import Servant.API.TypeLevel
import Web.FormUrlEncoded
(ToForm(..), urlEncodeAsForm)
import qualified Data.Universe.Helpers as U import qualified Data.Universe.Helpers as U

View file

@ -1,5 +1,4 @@
{-# LANGUAGE DataKinds #-} {-# LANGUAGE DataKinds #-}
{-# LANGUAGE DeriveDataTypeable #-}
{-# LANGUAGE DeriveFunctor #-} {-# LANGUAGE DeriveFunctor #-}
{-# LANGUAGE DeriveGeneric #-} {-# LANGUAGE DeriveGeneric #-}
{-# LANGUAGE FlexibleContexts #-} {-# LANGUAGE FlexibleContexts #-}
@ -36,8 +35,6 @@ import Test.Tasty.Golden
(goldenVsString) (goldenVsString)
import Test.Tasty.HUnit import Test.Tasty.HUnit
(Assertion, HasCallStack, assertFailure, testCase, (@?=)) (Assertion, HasCallStack, assertFailure, testCase, (@?=))
import Web.FormUrlEncoded
(ToForm)
import Servant.API import Servant.API
import Servant.Docs.Internal import Servant.Docs.Internal

View file

@ -58,6 +58,9 @@ module Servant.API (
module Web.HttpApiData, module Web.HttpApiData,
-- | Classes and instances for types that can be converted to and from HTTP API data. -- | Classes and instances for types that can be converted to and from HTTP API data.
-- * ToForm and FromForm
module Web.FormUrlEncoded,
-- | Classes and instances for working with Forms
-- * Experimental modules -- * Experimental modules
module Servant.API.Experimental.Auth, module Servant.API.Experimental.Auth,
@ -139,3 +142,5 @@ import Servant.Links
(HasLink (..), IsElem, IsElem', Link, URI (..), safeLink) (HasLink (..), IsElem, IsElem', Link, URI (..), safeLink)
import Web.HttpApiData import Web.HttpApiData
(FromHttpApiData (..), ToHttpApiData (..)) (FromHttpApiData (..), ToHttpApiData (..))
import Web.FormUrlEncoded
(ToForm (..), urlEncodeAsForm, toListStable)