I have recursive types like this:
type QueryInfo =
{ Title : string
Check : Client -> bool
Positive : Decision
Negative : Decision }
and Decision =
| Result of string
| Query of QueryInfo
I am going to make a generator for FsCheck. I have seen this and I am not interested in approaches like static member. My main problem is that every field has a different type.
FsCheck can already generate values of QueryInfo, but since the type is recursive, the generated values can become so deeply nested that generation of values effectively never stops (or, at least) is very slow.