I was too eager optimizing the list shrinker in #277 where the optimization of the 2-element case in the below code
let rec list_spine l yield =
let rec split l len acc = ... in
match l with
| [] -> ()
| [_] -> yield []
| [x;y] -> yield []; yield [x]; if x <> y then yield [y]
| ...
may raise an exception if the list happens to contain function values:
I was too eager optimizing the list shrinker in #277 where the optimization of the 2-element case in the below code
may raise an exception if the list happens to contain function values:
This just bit me in
qcheck-lin
, so this PRlist_spine
optimization andAfterwards I plan to roll a 0.21.1 bugfix release.