Skip to content

Generalise IO signatures (or at least some of them) to MonadIO #58

@merijn

Description

@merijn

I find myself wanting to stream results from a query using libraries like conduit/pipes, but currently this is rather cumbersome, as the ideal function for this sorta thing fold & co, demand a function a -> row -> IO a to return an IO a. If this was generalised to MonadIO m => a -> row -> m a and return "MonadIO m => m a` it would be easy to stream results by, for example, just passing in conduit's yield function.

Since sqlite-simple already depends on transformers (and MonadIO is in base on newer GHCs) this change would incur any new dependencies, so overall it seems like a lot of gain for relatively little work.

Metadata

Metadata

Assignees

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions