Skip to content

Commit ffdfeb2

Browse files
committed
Qualify the import of Data.List
1 parent 921cbab commit ffdfeb2

File tree

2 files changed

+8
-12
lines changed

2 files changed

+8
-12
lines changed

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

Lines changed: 4 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -26,10 +26,7 @@ import Data.Foldable
2626
(toList)
2727
import Data.Kind
2828
(Type)
29-
#if !MIN_VERSION_base_compat(0,14,0)
30-
import Data.List
31-
(foldl')
32-
#endif
29+
import qualified Data.List as List
3330
import Data.Sequence
3431
(fromList)
3532
import qualified Data.Text as T
@@ -232,7 +229,7 @@ instance (ToHttpApiData a, HasClient m sublayout)
232229

233230
clientWithRoute pm Proxy req vals =
234231
clientWithRoute pm (Proxy :: Proxy sublayout)
235-
(foldl' (flip appendToPath) req ps)
232+
(List.foldl' (flip appendToPath) req ps)
236233

237234
where ps = map toEncodedUrlPiece vals
238235

@@ -603,7 +600,7 @@ instance (KnownSymbol sym, ToHttpApiData a, HasClient m api)
603600

604601
clientWithRoute pm Proxy req paramlist =
605602
clientWithRoute pm (Proxy :: Proxy api)
606-
(foldl' (\ req' -> maybe req' (flip (appendToQueryString pname) req' . Just))
603+
(List.foldl' (\ req' -> maybe req' (flip (appendToQueryString pname) req' . Just))
607604
req
608605
paramlist'
609606
)
@@ -672,7 +669,7 @@ instance (KnownSymbol sym, ToDeepQuery a, HasClient m api)
672669

673670
clientWithRoute pm Proxy req deepObject =
674671
let params = toDeepQuery deepObject
675-
withParams = foldl' addDeepParam req params
672+
withParams = List.foldl' addDeepParam req params
676673
addDeepParam r' kv =
677674
let (k, textV) = generateDeepParam paramname kv
678675
in appendToQueryString k (encodeUtf8 <$> textV) r'

servant-client/src/Servant/Client/Internal/HttpClient.hs

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -33,10 +33,9 @@ import qualified Data.ByteString as BS
3333
import Data.ByteString.Builder
3434
(toLazyByteString)
3535
import qualified Data.ByteString.Lazy as BSL
36-
#if !MIN_VERSION_base_compat(0,14,0)
37-
import Data.Foldable (foldl')
38-
#endif
39-
import Data.Foldable (toList)
36+
import qualified Data.List as List
37+
import Data.Foldable
38+
(toList)
4039
import Data.Functor.Alt
4140
(Alt (..))
4241
import Data.Maybe
@@ -294,7 +293,7 @@ defaultMakeClientRequest burl r = return Client.defaultRequest
294293

295294
-- Query string builder which does not do any encoding
296295
buildQueryString [] = mempty
297-
buildQueryString qps = "?" <> foldl' addQueryParam mempty qps
296+
buildQueryString qps = "?" <> List.foldl' addQueryParam mempty qps
298297

299298
addQueryParam qs (k, v) =
300299
qs <> (if BS.null qs then mempty else "&") <> urlEncode True k <> foldMap ("=" <>) v

0 commit comments

Comments
 (0)