on develop help sign in
Upgrade example code for conduit >= 1.3

This on my machine appears to be the last compilation error standing in the way of compiling the project against lts-11. I may attempt after this to upgrade to lts-12.

commite2efb4c60ef7041224c0038293c32880682c712f authorMichael Xavier <michael@michaelxavier.net> dateThu 20 Dec 2018, 10:29 (8 years ago) parent2b241cb
1 file changed+3−3
examples/src/Example/Storage.hs+3−3
examples/src/Example/Storage.hs+3−3
@@ -15,7 +15,7 @@ module Example.Storage where
1515import Control.Lens ((&), (.~), (<&>), (?~))
1616import Control.Monad.Trans.Resource (liftResourceT, runResourceT)
1717
18−import Data.Conduit (($$+-))
18+import Data.Conduit (runConduit, (.|))
1919import Data.Text (Text)
2020
2121import System.IO (stdout)
@@ -62,7 +62,7 @@ example bucket input output = do
6262 -- Download from the bucket/key and create a source of the HTTP stream:
6363 stream <- Google.download (Storage.objectsGet bucket key)
6464
65− -- 'Conduit' actions such as '$$+-' need to be lifted into the 'Google'
65+ -- 'Conduit' actions such as '.|' need to be lifted into the 'Google'
6666 -- monad using 'liftResourceT', this will stream the received bytes
6767 -- into the 'output' file:
68− liftResourceT (stream $$+- Conduit.sinkFile output)
68+ liftResourceT (runConduit (stream .| Conduit.sinkFile output))