Skip to content

Commit a2bf235

Browse files
committed
Remove base-compat and use TypeApplications
1 parent 8e9e9ba commit a2bf235

File tree

2 files changed

+2
-4
lines changed

2 files changed

+2
-4
lines changed

servant-multipart-client/servant-multipart-client.cabal

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,6 @@ library
3030
build-depends:
3131
array >=0.5.1.1 && <0.6
3232
, base >=4.9 && <5
33-
, base-compat >=0.11.2 && <0.14
3433
, bytestring >=0.10.8.1 && <0.12
3534
, text >=1.2.3.0 && <2.1
3635
, random >=0.1.1 && <1.3

servant-multipart-client/src/Servant/Multipart/Client.hs

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,6 @@ import Servant.Multipart.API
2727
import Control.Monad (replicateM)
2828
import Data.Array (listArray, (!))
2929
import Data.List (foldl')
30-
import Data.List.Compat (singleton)
3130
#if !MIN_VERSION_base(4,11,0)
3231
import Data.Monoid ((<>))
3332
#endif
@@ -75,7 +74,7 @@ instance MultipartClient Tmp where
7574
readHandle hdl = fromActionStep LBS.null (LBS.hGet hdl 4096)
7675

7776
instance MultipartClient Mem where
78-
loadFile _ = source . singleton
77+
loadFile _ = source . pure @[]
7978

8079
-- | Generates a boundary to be used to separate parts of the multipart.
8180
-- Requires 'IO' because it is randomized.
@@ -133,7 +132,7 @@ multipartToBody boundary mp = RequestBodySource $ files' <> source ["--", bounda
133132
renderInput input = renderPart (lencode . iName $ input)
134133
"text/plain"
135134
""
136-
(source . singleton . lencode . iValue $ input)
135+
(source . pure @[] . lencode . iValue $ input)
137136
inputs' = foldl' (\acc x -> acc `mappend'` renderInput x) mempty' (inputs mp)
138137
renderFile :: FileData tag -> SourceIO LBS.ByteString
139138
renderFile file = renderPart (lencode . fdInputName $ file)

0 commit comments

Comments
 (0)