janestreet / janestreet/base_quickcheck

`[@@deriving quickcheck]` causes type error

Open
#2 6 comments 0 reactions 0 assignees View on GitHub
forwarded-to-js-devs
Dominant language
OCaml
Stars
18
Forks
11
PR merge metrics
No merged PRs in 30d

Description

```
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?

Contributor guide

Open the contributing guide

Research direction

Start by reproducing the reported error with the recursive type and `[@@deriving quickcheck]` snippet from the issue. Investigate how recursive types are handled by the deriving support and compare the available generation approach; done means identifying whether this is a supported bug and documenting the recommended way to generate values.

Written by the indexing model from the issue text.

Assessment

Tech stack
ocaml
Domain
testing-qa
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.