base_quickcheck icon indicating copy to clipboard operation
base_quickcheck copied to clipboard

`[@@deriving quickcheck]` causes type error

Open wang-d opened this issue 5 years ago • 6 comments

type 'a t = Zero | Succ of 'a t [@@deriving quickcheck]

causes this error:

This expression should not be a function, the expected type is
 'a Base_quickcheck.Generator.t 

Can you reproduce?

What is the recommended way to generate quickcheck values for this type?

wang-d avatar Oct 06 '20 04:10 wang-d

I can reproduce that. I'll look into it, I had not been aware of this error.

ceastlund avatar Oct 06 '20 14:10 ceastlund

Thanks for this report. Looks like recursive types with type parameters were broken in general. They're fixed now internally. The unstable github sources should pick up the fix soon (generally weekly); the opam release should pick up the fix next time we do a public release (should be in a few months).

ceastlund avatar Oct 07 '20 21:10 ceastlund

Thanks for the quick fix. I'll let you close this issue whenever your workflow would dictate.

wang-d avatar Oct 08 '20 23:10 wang-d

Should be fixed in 54cdf7f.

aalekseyev avatar Dec 02 '20 13:12 aalekseyev

@aalekseyev Any plans to make a release in 2022?

Kakadu avatar Jan 01 '22 10:01 Kakadu

@Kakadu, very much so. I think it will happen this month.

aalekseyev avatar Jan 03 '22 11:01 aalekseyev