Skip to content

Commit 97ad20c

Browse files
committed
Re-export Web.FormUrlEncoded from Servant.API
1 parent cee0763 commit 97ad20c

File tree

7 files changed

+8
-13
lines changed

7 files changed

+8
-13
lines changed

servant-client-core/servant-client-core.cabal

-1
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,6 @@ library
7979
, base64-bytestring >= 1.0.0.1 && < 1.1
8080
, exceptions >= 0.10.0 && < 0.11
8181
, free >= 5.1 && < 5.2
82-
, http-api-data >= 0.4 && < 0.4.2
8382
, http-media >= 0.7.1.3 && < 0.9
8483
, http-types >= 0.12.2 && < 0.13
8584
, network-uri >= 2.6.1.0 && < 2.7

servant-client-core/src/Servant/Client/Core/HasClient.hs

+1-3
Original file line numberDiff line numberDiff line change
@@ -49,16 +49,14 @@ import Servant.API
4949
IsSecure, MimeRender (mimeRender),
5050
MimeUnrender (mimeUnrender), NoContent (NoContent), QueryFlag,
5151
QueryParam', QueryParams, QueryParamForm', Raw, ReflectMethod (..), RemoteHost,
52-
ReqBody', SBoolI, Stream, StreamBody', Summary, ToHttpApiData,
52+
ReqBody', SBoolI, Stream, StreamBody', Summary, ToHttpApiData, ToForm (..),
5353
ToSourceIO (..), Vault, Verb, NoContentVerb, WithNamedContext,
5454
contentType, getHeadersHList, getResponse, toQueryParam,
5555
toUrlPiece)
5656
import Servant.API.ContentTypes
5757
(contentTypes)
5858
import Servant.API.Modifiers
5959
(FoldRequired, RequiredArgument, foldRequiredArgument)
60-
import Web.FormUrlEncoded
61-
(ToForm (..))
6260

6361
import Servant.Client.Core.Auth
6462
import Servant.Client.Core.BasicAuth

servant-client-core/src/Servant/Client/Core/Request.hs

+2-3
Original file line numberDiff line numberDiff line change
@@ -53,9 +53,8 @@ import Network.HTTP.Types
5353
(Header, HeaderName, HttpVersion (..), Method, QueryItem,
5454
http11, methodGet)
5555
import Servant.API
56-
(ToHttpApiData, toEncodedUrlPiece, toHeader, SourceIO)
57-
import Web.FormUrlEncoded
58-
(ToForm (..), toListStable)
56+
(ToHttpApiData, toEncodedUrlPiece, toHeader, SourceIO,
57+
ToForm (..), toListStable)
5958

6059
import Servant.Client.Core.Internal (mediaTypeRnf)
6160

servant-docs/servant-docs.cabal

-2
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,6 @@ library
6262
, base-compat >= 0.10.5 && < 0.12
6363
, case-insensitive >= 1.2.0.11 && < 1.3
6464
, hashable >= 1.2.7.0 && < 1.4
65-
, http-api-data >= 0.4 && < 0.4.2
6665
, http-media >= 0.7.1.3 && < 0.9
6766
, http-types >= 0.12.2 && < 0.13
6867
, lens >= 4.17 && < 4.19
@@ -101,7 +100,6 @@ test-suite spec
101100
base
102101
, base-compat
103102
, aeson
104-
, http-api-data
105103
, lens
106104
, servant
107105
, servant-docs

servant-docs/src/Servant/Docs/Internal.hs

-2
Original file line numberDiff line numberDiff line change
@@ -64,8 +64,6 @@ import GHC.TypeLits
6464
import Servant.API
6565
import Servant.API.ContentTypes
6666
import Servant.API.TypeLevel
67-
import Web.FormUrlEncoded
68-
(ToForm(..), urlEncodeAsForm)
6967

7068
import qualified Data.Universe.Helpers as U
7169

servant-docs/test/Servant/DocsSpec.hs

-2
Original file line numberDiff line numberDiff line change
@@ -36,8 +36,6 @@ import Test.Tasty.Golden
3636
(goldenVsString)
3737
import Test.Tasty.HUnit
3838
(Assertion, HasCallStack, assertFailure, testCase, (@?=))
39-
import Web.FormUrlEncoded
40-
(ToForm)
4139

4240
import Servant.API
4341
import Servant.Docs.Internal

servant/src/Servant/API.hs

+5
Original file line numberDiff line numberDiff line change
@@ -58,6 +58,9 @@ module Servant.API (
5858
module Web.HttpApiData,
5959
-- | Classes and instances for types that can be converted to and from HTTP API data.
6060

61+
-- * ToForm and FromForm
62+
module Web.FormUrlEncoded,
63+
-- | Classes and instances for working with Forms
6164

6265
-- * Experimental modules
6366
module Servant.API.Experimental.Auth,
@@ -139,3 +142,5 @@ import Servant.Links
139142
(HasLink (..), IsElem, IsElem', Link, URI (..), safeLink)
140143
import Web.HttpApiData
141144
(FromHttpApiData (..), ToHttpApiData (..))
145+
import Web.FormUrlEncoded
146+
(ToForm (..), urlEncodeAsForm, toListStable)

0 commit comments

Comments
 (0)