-
Notifications
You must be signed in to change notification settings - Fork 38
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
ppx_deriving_qcheck cannot derive a generator from a recursive type declaration with containers #269
Comments
Thanks for the report! Ping @vch9 - I think we are not handling type constructors correctly in |
Thanks for the report again. Definitely a problem in |
I think the deriver fails on a very much simpler example: It creates: let gen = QCheck.Gen.list gen
let arb = QCheck.make @@ gen Should we be smarter than: let rec gen = QCheck.Gen.list gen
let arb = QCheck.make @@ gen ? |
IMO using I suggest prioritising the reported case In trying out a potential workaround I just experienced the following error variant:
|
I'm not sure but I think this is related. I'm having an issue where I can't derive a generator in a mutually recursive datatype with equivalent constructors: [@deriving qcheck]
type conflicting_constructor =
| A
| B(conflicting_constructor2)
and conflicting_constructor2 =
| B(conflicting_constructor)
| C;
|
Minimal reproducible example:
ppx_deriving_qcheck
produces the following generator with unboundgen
:This trick (given
-rectypes
is enabled) make it derive the following generator:However, this generatior is non-terminating.
The text was updated successfully, but these errors were encountered: