proper icon indicating copy to clipboard operation
proper copied to clipboard

Generators inside maps

Open lbueso opened this issue 3 years ago • 0 comments

When generators are introduced inside containers like lists and tuples they work as expected:

1> proper_gen:pick({key, proper_types:nat()}).   
{ok,{key,7}}
2> proper_gen:pick([proper_types:nat()]).     
{ok,[0]}

But when a generator is introduced in a map it does not produce any value:

3> proper_gen:pick(#{key => proper_types:nat()}).
{ok,#{key =>
          {'$type',[{generator,#Fun<proper_types.79.60513951>},
                    {kind,wrapper}]}}}

I suppose this has some relation with issues #111, #118 and #238.

lbueso avatar Mar 25 '22 18:03 lbueso