Skip to content

Drop runFold#4

Merged
edsko merged 1 commit into
mainfrom
edsko/delete-runFold
Sep 19, 2025
Merged

Drop runFold#4
edsko merged 1 commit into
mainfrom
edsko/delete-runFold

Conversation

@edsko

@edsko edsko commented Sep 19, 2025

Copy link
Copy Markdown
Collaborator

The contract of runFold promised

--- If the fold has an associated exception handler, it will get a chance to
--- catch any exceptions thrown. See 'foldWithHandler' for detailed discussion.

but that is a contract it could not keep: after all, the whole point for introducing foldWithHandler in the first place was that we need to treat these handlers very carefully, simply using handle does not work.

It turns out we don't actually need runFold, so deleted it altogether; I think this clarifies the situation on the hs-bindgen side also (see discussion of topLevelFold there).

The contract of `runFold` promised

```hs
--- If the fold has an associated exception handler, it will get a chance to
--- catch any exceptions thrown. See 'foldWithHandler' for detailed discussion.
```

but that is a contract it could not keep: after all, the whole point for introducing `foldWithHandler` in the first place was that we need to treat these handlers very carefully, simply using `handle` does not work.

It turns out we don't actually _need_ `runFold`, so deleted it altogether; I
think this clarifies the situation on the `hs-bindgen` side also (see
discussion of `topLevelFold` there).
@edsko
edsko enabled auto-merge September 19, 2025 05:36
@edsko
edsko added this pull request to the merge queue Sep 19, 2025
Merged via the queue into main with commit 8105e5e Sep 19, 2025
8 checks passed
@edsko
edsko deleted the edsko/delete-runFold branch September 19, 2025 05:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant