Can queryChunked live in MonadIO rather than in IO?
https://github.com/maoe/influxdb-haskell/blob/4b84a55bc71a19a97ce339613c27249fc1aa2b0f/src/Database/InfluxDB/Query.hs#L475-L476
add a MonadIO m constraint and have the FoldM use this m rather than IO, and have the function return m r.
Background: I want to use this function to create a conduit source... thus in my case m would be something like ConduitT () a IO
I don't think you can turn IO in a negative position to just MonadIO m. You'd need monad-control, monad-unlift, or something like that. Also FoldM consumes the responses rather than producing them. If you want a conduit source, you'll likely use withQueryResponse instead.
What type signature will your conduit source have?