Patch 2237 resolve issue2691

Title resolve issue2691
Superseder Nosy List bf
Related Issues
Status needs-review Assigned To

Created on 2022-04-24.09:29:37 by bf, last changed 2022-04-24.09:36:17 by bf.

File name Status Uploaded Type Edit Remove
fix-a-corner-case-of-spec_betweenlinesps.dpatch bf, 2022-04-24.09:29:37 application/x-darcs-patch
patch-preview.txt bf, 2022-04-24.09:29:37 text/x-darcs-patch
See mailing list archives for discussion on individual patches.
msg22995 (view) Author: bf Date: 2022-04-24.09:29:37
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.
Date User Action Args
2022-04-24 09:29:37bfcreate
2022-04-24 09:36:17bfsetstatus: needs-screening -> needs-review