darcs

Patch 2237 resolve issue2691

Title resolve issue2691
Superseder Nosy List bfrk
Related Issues
Status accepted Assigned To
Milestone

Created on 2022-04-24.09:29:37 by bfrk, last changed 2023-06-24.16:16:17 by ganesh.

Files
File name Status Uploaded Type Edit Remove
fix-a-corner-case-of-spec_betweenlinesps.dpatch bfrk, 2022-04-24.09:29:37 application/x-darcs-patch
patch-preview.txt bfrk, 2022-04-24.09:29:37 text/x-darcs-patch
See mailing list archives for discussion on individual patches.
Messages
msg22995 (view) Author: bfrk 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.
Attachments
msg23381 (view) Author: ganesh Date: 2023-06-24.15:27:48
OK - I didn't read this all in detail but it sounds sensible.
History
Date User Action Args
2022-04-24 09:29:37bfrkcreate
2022-04-24 09:36:17bfrksetstatus: needs-screening -> needs-review
2023-06-24 15:27:48ganeshsetstatus: needs-review -> accepted-pending-tests
messages: + msg23381
2023-06-24 16:16:17ganeshsetstatus: accepted-pending-tests -> accepted