diff --git a/servant-multipart-client/servant-multipart-client.cabal b/servant-multipart-client/servant-multipart-client.cabal index affd274..7f62bfc 100644 --- a/servant-multipart-client/servant-multipart-client.cabal +++ b/servant-multipart-client/servant-multipart-client.cabal @@ -30,7 +30,6 @@ library build-depends: array >=0.5.1.1 && <0.6 , base >=4.9 && <5 - , base-compat >=0.11.2 && <0.14 , bytestring >=0.10.8.1 && <0.12 , text >=1.2.3.0 && <2.1 , random >=0.1.1 && <1.3 diff --git a/servant-multipart-client/src/Servant/Multipart/Client.hs b/servant-multipart-client/src/Servant/Multipart/Client.hs index f69ba68..2eae047 100644 --- a/servant-multipart-client/src/Servant/Multipart/Client.hs +++ b/servant-multipart-client/src/Servant/Multipart/Client.hs @@ -27,7 +27,6 @@ import Servant.Multipart.API import Control.Monad (replicateM) import Data.Array (listArray, (!)) import Data.List (foldl') -import Data.List.Compat (singleton) #if !MIN_VERSION_base(4,11,0) import Data.Monoid ((<>)) #endif @@ -75,7 +74,7 @@ instance MultipartClient Tmp where readHandle hdl = fromActionStep LBS.null (LBS.hGet hdl 4096) instance MultipartClient Mem where - loadFile _ = source . singleton + loadFile _ = source . pure @[] -- | Generates a boundary to be used to separate parts of the multipart. -- Requires 'IO' because it is randomized. @@ -133,7 +132,7 @@ multipartToBody boundary mp = RequestBodySource $ files' <> source ["--", bounda renderInput input = renderPart (lencode . iName $ input) "text/plain" "" - (source . singleton . lencode . iValue $ input) + (source . pure @[] . lencode . iValue $ input) inputs' = foldl' (\acc x -> acc `mappend'` renderInput x) mempty' (inputs mp) renderFile :: FileData tag -> SourceIO LBS.ByteString renderFile file = renderPart (lencode . fdInputName $ file)