I'm using PropEr to write my property based test. How can I see what kind of data my generator produces?
Let's say I have the following generator:
-module(my).
-include_lib("proper/include/proper.hrl").
-export([valid_type_gen/0]).
valid_type_gen() -> non_empty(list(any())).
I would like to examine what kind of data it generates, i.e. something like:
$ erl
1> my:valid_type_gen().sample() %???
[1,b,"blah"]
For the same question in Triq, look here.
The relevant function is
proper_gen:pick/1
. It returns a tuple{ok, V}
.