Closed anisjonischkeit closed 4 years ago
The shrinker I can understand, but the sieve might be a bit too much. I'd say the one should rather write
gen.Map(func ...).SuchThat(newSieve)
Rather than just taking over whatever sieve gen
had.
Maybe you have a concrete example in mind.
To be honest, I think I was just thinking whether I could, not whether I should. I actually think there are more examples of where it doesn't make sense than where it does. I think if Sieves stuck onto the part of the generator they are applied on it'd make sense to keep that e.g.:
intGen.SuchThat(intLessThan1000).Map(intToTime)
But since (it seems to me) Sieves are a top level thing for generators, keeping them through map doesn't make any sense. I'll remove it 👍
There's no reason to lose the Shrinker if the types don't change.