We use fail in servant-pipes

This commit is contained in:
Oleg Grenrus 2019-09-11 10:42:03 +03:00
parent b04261bf4d
commit 09f452ba07
1 changed files with 1 additions and 1 deletions

View File

@ -65,7 +65,7 @@ instance (MonadIO m, a' ~ X, a ~ (), b' ~ (), r ~ ())
fromSourceIO src = M $ liftIO $ S.unSourceT src (return . go) where
go :: S.StepT IO b -> Proxy X () () b m ()
go S.Stop = Pure ()
go (S.Error err) = M (fail err)
go (S.Error err) = M (liftIO (fail err))
go (S.Skip s) = go s -- drives
go (S.Effect ms) = M (liftIO (fmap go ms))
go (S.Yield x s) = Respond x (const (go s))