Bonsai/sexp_grammar : purpose of quickcheck

Bonsai has a really cool example – sexp-grammar – showing off an ‘ast’ editor derived automatically from the data types.

In the impl, there is a [@@deriving quickcheck] at https://github.com/janestreet/bonsai/blob/v0.16/examples/sexp_grammar/type_intf.ml#L11

What is going on here, why do we need this, is there some fundamental connection to generating random values of the data type ?

1 Like

They’re using ppx_quickcheck and quickcheck to generate random values here.

2 Likes