Processing of `;%lwt`
Nobody has claimed this yet.
- Dominant language
- OCaml
- Stars
- 10.3k
- Forks
- 438
- PR merge metrics
- No merged PRs in 30d
Description
I've stumbled across Lwt documentation which states the following:
With OCaml 4.04.0 and on a convenient syntax is available for sequencing Lwt operations using ;%lwt. This allows free mixing of standard ; sequencing and ;%lwt sequencing without extra parentheses
I've tired it, it did not work with Lwt as I expected, I've started an issue on that in Lwt repo and got the following input (by @hcarty):
Reason doesn't have proper
;%lwtsupport in its parser, so it ends up mis-applied to the surrounding code. So while;%lwtworks properly in OCaml code, it doesn't do what you'd expect in Reason.
Looks like this was not reported previously, hence this feature request issue. Is it possible to introduce proper support for monadic semicolons? Current behaviour when it seemingly works but does the wrong thing is quite counter-intuitive :)
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by reproducing the reported ;%lwt behavior in the Reason parser and compare it with the documented OCaml behavior and the linked Lwt issue. No source file or test is named in the report, so the work is to determine the parser entry point, define correct monadic-semicolon behavior, and verify that surrounding sequencing is no longer mis-applied.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- ocaml
- Domain
- compilers
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 25/100