-
Notifications
You must be signed in to change notification settings - Fork 36
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
feat: add Gen.option #230
feat: add Gen.option #230
Conversation
Also rename the internal H.opt to H.option within Observable
LGTM!
Should we update the deriver to use
|
Thanks for the update! The CI is failing the tests. @vch9 wrote a bunch of good tests to ensure that the ppx produces the expected output. |
let p = RS.float st 1. in | ||
if p < (1. -. ratio) | ||
then Tree.pure None | ||
else Tree.opt (gen st) | ||
|
||
(** [opt] is an alias of {!val:option} for backward compatibility. *) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe we can begin the "deprecated" cycle here?
Looks fine to me as well. I'd be in favor of deprecating the |
I'm slightly worried that deprecating |
I think the next release will (or should) include #223 which would introduce this deprecation cycle anyway. But as I'm not done with this PR the maintainers may publish a release without it, I could deprecate opt in #223 afterward, and then, leave your PR as is. |
Thanks for this - and sorry for the delay. Merging... |
Close #226.