Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add support for first-class exceptions #60

Merged
merged 2 commits into from
Jan 28, 2024

Conversation

mt-caret
Copy link
Contributor

The existing implementation of OCamlException embeds a RawOCaml pointer inside which can be invalidated on a garbage collection, so I believe it is unsafe. This PR changes OCamlException so it's a first-class OCaml<_> value and can be returned from functions as such.

@tizoc
Copy link
Owner

tizoc commented Jan 28, 2024

Good catch. I need to take another look at this one, but looks good in general. I am not even sure why it wasn't like this already.

@tizoc
Copy link
Owner

tizoc commented Jan 28, 2024

@mt-caret btw, now that I have merged #61, a rebase is needed here

@mt-caret
Copy link
Contributor Author

Done!

@tizoc tizoc merged commit 31bef9b into tizoc:master Jan 28, 2024
3 checks passed
@tizoc
Copy link
Owner

tizoc commented Jan 28, 2024

@mt-caret merged and released in 0.10.0 along with #61

@mt-caret mt-caret deleted the first-class-exceptions branch January 28, 2024 14:39
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.

2 participants