4 patches for repository http://darcs.net/screened:
patch 93e44178a87362d9d94760fe929b84e9ca05e51e
Author: Ben Franksen <ben.franksen@online.de>
Date: Sun Apr 24 09:49:06 CEST 2022
* fix a corner case of spec_betweenLinesPS
This makes it behave in the same way as betweenLinesPS behaved when the
start and end line are immediately adjacent.
patch 285add7c13712e981b821d1609cacf882be0894a
Author: Ben Franksen <ben.franksen@online.de>
Date: Sun Apr 24 10:06:11 CEST 2022
* add property test prop_linesPS_unlinesPS_right_inverse
patch 93c3e3460a162112c638c9aebe8adbcc3681766c
Author: Ben Franksen <ben.franksen@online.de>
Date: Fri Apr 22 14:59:39 CEST 2022
* improve some haddocks in Darcs.Util.ByteString
patch 7fa9f6d295b61b1569f4e4ae30f5a8ee32b0a49b
Author: Ben Franksen <ben.franksen@online.de>
Date: Sun Apr 24 10:10:18 CEST 2022
* resolve issue2691: QC test failure for betweenLinesPS
This first fixes the test by introducing two newtype wrappers for ByteString
to tweak probabilities such that betweenLinesPS actually finds the start and
end lines (in order) in the input in about 6% of cases, which uncovered a
few more bugs in the implementation of betweenLinesPS. The new
implementation fixes them and also improves efficiency by strictly avoiding
ByteString copying and allocations. Getting this right was more difficult
than I expected, and would have been almost impossible w/o a specification
to test against.