Skip to content

facade ok may list several success constants (SQLITE_OK/ROW/DONE) #1432

Closed

Description

@ehartford

Ruling §17: "A producing declaration may state a success condition: ok SQLITE_OK … There is no universal rule that 0 == success or that any other integer convention applies across C generally or across an entire library. Without status evidence, status remains uninterpreted."

Stage 5 (#1426) projects ok CONST onto Result[R, <R>Error], and following Eric's ruling of 2026-09-23 it no longer renders the low-level (status, Option[R]) constructor beside the projection.

  • Some APIs have more than one success status. SQLite's sqlite3_step returns SQLITE_ROW and SQLITE_DONE, and both are success.
  • Such an API needs ok to list several constants, e.g. ok SQLITE_OK, SQLITE_ROW, SQLITE_DONE.
  • The Ok side would then carry the matched status too.
  • Keeping the raw form is not the answer (Eric: "success statuses beyond one constant are a future ok list, not a reason to keep the raw form").

Not implemented. It needs the grammar/spec sentence first, and the §61 verification that each listed constant is an imported compile-time value.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions