[darcs-devel] shrinkPatchInfo goes into infinite loop

Ben Franksen ben.franksen at online.de
Fri Mar 6 21:24:46 UTC 2020


Am 02.03.20 um 14:53 schrieb Ben Franksen:
> I'd say that for the moment we should support both, just to be on the
> safe side. Large test cases certainly are good to have.

Unfortunately it turned out there are two good reasons not to use
leancheck. It has a serious space leak issue and that is unfixable. This
is a general problem with enumerating data types in a purely functional
style. See ticket 15 at the leancheck github repo for a discussion.
Another point is that the integration with test-framework is weak: it
does not support incremental progress reports. All tests are run
silently and then you get the output in a big rush.

An alternative is FEAT. Unfortunately this one requires Typeable for
enumeratable data types, which rules out our patch (and repo model)
types. It also says things about mempoizing things internally which
sound a bit scary to me and not like constant memory. I haven't looked
at smallcheck yet but I guess it has similar limitations.

I am now tempted to write my own property testing library with an IO
based generator monad. Generating all possible values in such a way that
you can "reset" the generator to restart enumerating at the beginning,
while using constant memory, should be easy when programming
imperatively. Perhaps this can be done in a cleaner way using one the
the streaming libraries (conduit, pipes, whatever).
-------------- next part --------------
A non-text attachment was scrubbed...
Name: pEpkey.asc
Type: application/pgp-keys
Size: 4211 bytes
Desc: not available
URL: <http://lists.osuosl.org/pipermail/darcs-devel/attachments/20200306/b1d5175c/attachment.key>


More information about the darcs-devel mailing list