Repository navigation
Description
Tracking issue for the remaining effect-row/default-handling gap recorded in docs/effects-showcase.md.
Current state
--strict-effects enables compile-time effect coverage checking for lexical handlers, declared function rows, and first-class function types carrying effect rows. The latter is now covered by tests/unit/test_effect_rows.py; the old claim that function-type rows were still open is obsolete.
Strict type checking also validates effect-operation names, arity, argument types and return types for Effect.operation(...) calls.
The remaining 1.0 problem is the default coverage/failure policy.
Without --strict-effects, an unhandled operation still uses the soft runtime path. FLOW_STRICT_EFFECTS=1 can make that runtime path abort, while --strict-effects additionally enables compile-time coverage checking and hardcodes the abort path in generated C. With neither enabled, a missing handler may return a zero value silently.
1.0 decision
For the Stable 1.0 effect system, silently losing an effect should not be the normal default. The target policy tracked by #643 is:
- normal Stable compilation performs effect-row coverage checking;
- an unhandled Stable effect is a compile-time error where coverage is statically knowable;
- any remaining runtime-unhandled path fails loudly rather than returning a silent zero value;
- a deliberately permissive/legacy mode may remain available only as an explicit opt-in;
- handler nesting, propagation and the tail-resumptive continuation boundary remain specified and tested.
Acceptance
- Normal Stable compilation enables effect-row coverage checking without requiring
--strict-effects. - Missing handlers do not silently produce zero values in normal Stable mode.
- A deliberately permissive compatibility mode, if retained, is explicit rather than the default.
- Declared function effect rows are enforced.
- First-class function types carrying effect rows are parsed and enforced.
- CLI/docs/tests agree on the default policy.
- Stable effect examples pass under the canonical
flowcpath.
Related
- [1.0] Finalise effect-system soundness and 1.x semantics #643 — Flow 1.0 effect-system stabilisation workstream.
- Algebraic effects are tail-resumptive only: no abort, retry, or multi-shot continuations #564 — abort/retry/multi-shot continuations; separate future capability and not automatically a 1.0 blocker if the tail-resumptive boundary is explicit.
Metadata
Metadata
Assignees
Labels
Type
Projects
- StatusShow more project fieldsDone
Activity
[-]Effect rows are only enforced under --strict-effects; function types with rows still open[/-][+]Decide and enforce Flow 1.0 default behaviour for unhandled effects[/+]godofecht commentedon Oct 1, 2026
Reference implementation against the retired Python compiler: tag archive/feat/563-effects-default (6f693d2). Useful as a design starting point for the Flow implementation.
godofecht commentedon Oct 2, 2026
Resolved in PR #1182. Stable effect coverage and fail-loud runtime handling were already implemented; this change aligns the CLI help, language reference, examples, and goldens with that default. Legacy zero/no-op behavior is explicit through FLOWC_PERMISSIVE_EFFECTS=1 and FLOW_PERMISSIVE_EFFECTS=1. Hosted CI passed.