Generates a value which is the result of the given function returning
a
Just.
The original generator's shrink tree will be retained, with values
returning
Nothing removed. Subsequent shrinks of those values
will be retained. Compared to
mapMaybeT, shrinking may be
slower but will be optimal.
The type is also more general, because the shrink behavior from
mapMaybe would force the entire shrink tree to be evaluated
when applied to an impure tree.
It's possible that the function will never return
Just, or will
only do so a larger size than we're currently running at. To avoid
looping forever, we limit the number of retries, and grow the size
with each retry. If we retry too many times then the whole generator
is discarded.