I guess this debate is not converging because we have separate goals: I want prepared statements (e.g., avoidance of  unnecessary recompilation of SQL) and you're more after iteratee-style access.  IMO the new API should implement both in a satisfactory and safe manner.

Sorry, yeah, I made a mistake in my example.  What I meant was:

``` haskell
comments <- withStatement "SELECT * FROM comments WHERE id = ?" $ \stmt ->
   mapM_ (\id -> pquery stmt  (Only id)) list_of_some_ids_here
```

The typical usage of statement's from sqlite's documentation: http://www.sqlite.org/c3ref/stmt.html.  Reading through the docs, multiple query usage would also need explicit sqlite3_reset (note, this is not the same as reset_bindings) call after each step sequence.  To use this pattern successfully, one needs to:

- open a statement with withStatement
- for each sub-query (this is `pquery` from my above example):
    - bind parameters
    - run a series of steps until we hit Done
    - sqlite3_reset

For this usage, pquery, pquery_, pexecute, pexecute_ would make sense and would provide a much safer API.  These will need some type of a `withBind, but IMO this can be internal to the implementation - if we don't like withBind, no need to export it.  We should export `bind` and `reset` (sqlite3_reset) which are needed to implement the above multiple query scenario.

 * *

Re: `bind` requires the query string, oh yes, I didn't realize that.  It's there to be used in case formatting exceptions get thrown - I think it's useful to have the SQL statement included in these exceptions.  Rather than taking a local copy of the query string in Base.Statement, we can implement this using sqlite3_sql (see http://www.sqlite.org/c3ref/sql.html) - IMO better to use this rather than incurring memory allocation per query just to throw a more detailed error message.  I can add this to direct-sqlite.

I will ask my use-case question again: Can you please provide a code example using iteratees/conduits which demonstrates the use you're after?  I'd really like to see a complete example which uses the proposed API.  It seems that if we're after iteratee-style use, we shouldn't be debating withStatement at all - no?  I thought you wanted openStatement and closeStatement for such use?