Skip to content

Commit

Permalink
Merge pull request #455 from recursion-ninja/master
Browse files Browse the repository at this point in the history
Fixing compilation errors with GHC-9.0-rc1
  • Loading branch information
snoyberg authored Nov 23, 2020
2 parents e40507d + ce1e38e commit 2f9e868
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions conduit/src/Data/Conduit/Internal/Conduit.hs
Original file line number Diff line number Diff line change
Expand Up @@ -329,7 +329,7 @@ connectResume (SealedConduitT left0) (ConduitT right0) =

sourceToPipe :: Monad m => Source m o -> Pipe l i o u m ()
sourceToPipe =
go . flip unConduitT Done
go . (`unConduitT` Done)
where
go (HaveOutput p o) = HaveOutput (go p) o
go (NeedInput _ c) = go $ c ()
Expand All @@ -339,7 +339,7 @@ sourceToPipe =

sinkToPipe :: Monad m => Sink i m r -> Pipe l i o u m r
sinkToPipe =
go . injectLeftovers . flip unConduitT Done
go . injectLeftovers . (`unConduitT` Done)
where
go (HaveOutput _ o) = absurd o
go (NeedInput p c) = NeedInput (go . p) (const $ go $ c ())
Expand All @@ -349,7 +349,7 @@ sinkToPipe =

conduitToPipe :: Monad m => Conduit i m o -> Pipe l i o u m ()
conduitToPipe =
go . injectLeftovers . flip unConduitT Done
go . injectLeftovers . (`unConduitT` Done)
where
go (HaveOutput p o) = HaveOutput (go p) o
go (NeedInput p c) = NeedInput (go . p) (const $ go $ c ())
Expand Down Expand Up @@ -402,7 +402,7 @@ catchC :: (MonadUnliftIO m, Exception e)
catchC (ConduitT p0) onErr = ConduitT $ \rest -> let
go (Done r) = rest r
go (PipeM mp) = PipeM $ withRunInIO $ \run -> E.catch (run (liftM go mp))
(return . flip unConduitT rest . onErr)
(return . (`unConduitT`rest) . onErr)
go (Leftover p i) = Leftover (go p) i
go (NeedInput x y) = NeedInput (go . x) (go . y)
go (HaveOutput p o) = HaveOutput (go p) o
Expand Down Expand Up @@ -694,7 +694,7 @@ passthroughSink (ConduitT sink0) final = ConduitT $ \rest -> let
-- Since 1.2.6
sourceToList :: Monad m => Source m a -> m [a]
sourceToList =
go . flip unConduitT Done
go . (`unConduitT` Done)
where
go (Done _) = return []
go (HaveOutput src x) = liftM (x:) (go src)
Expand Down

0 comments on commit 2f9e868

Please sign in to comment.