Skip to content

Navigation Menu

Sign in
Sign up

refactor: use effect syntax from OCaml 5.3 - #33

Open
favonia wants to merge 1 commit into
main from
ocaml5.3
Open

refactor: use effect syntax from OCaml 5.3 #33
favonia wants to merge 1 commit into
main from
ocaml5.3

Conversation

@favonia

@favonia favonia commented Sep 28, 2024

Copy link
Copy Markdown
Contributor

No description provided.

jonsterling reacted with thumbs up emoji jonsterling reacted with hooray emoji jonsterling reacted with heart emoji jonsterling reacted with eyes emoji
Comment thread src/State.ml
| effect Set v, k -> st := v; continue k ()

let try_with ?(get=get) ?(set=set) f =
let open Effect.Deep in

@jonsterling jonsterling Oct 2, 2024

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is open Effect.Deep needed anymore?

@favonia favonia Oct 2, 2024
edited
Loading

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@jonsterling Yes. See ocaml/ocaml#13511 for my Thought on this.

jonsterling reacted with heart emoji

@jonsterling jonsterling Oct 2, 2024

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Wow, that is a very nice Thought.

favonia reacted with heart emoji

@favonia favonia Oct 2, 2024
edited
Loading

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@jonsterling It's also why we have these two helper functions:

https://github.com/RedPRL/algaeff/blob/main/src/Fun.ml

It will be great if the compiler can do it directly, avoiding the overhead of creating stupid closures.

jonsterling reacted with heart emoji
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

@jonsterling jonsterling jonsterling left review comments

Assignees

No one assigned

Labels

None yet

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

AltStyle によって変換されたページ (->オリジナル) /