[darcs-devel] [patch1979] remove obsolete comment (and 7 more)

Ben Franksen bugs at darcs.net
Mon Feb 10 09:36:26 UTC 2020


Ben Franksen <ben.franksen at online.de> added the comment:

Whoa, this is a lot of code to take in!

Don't take this wrong, shrinking counter-examples is greatly appreciated.

I have a few preliminary comments/questions:

The Shrinkable class has only trivial implementations for
RepoPatchV1/2/3. It looks as if it is there for sequences of Named
patches only. If this is true, then why use a class at all and not just
plain helper functions?

The PropagateShrink class: reading the docs and studying the types did
not help me understand where the simplifying fixup originally comes
from. I could finally track this down to shrinkModel, and its
implementation for V1Model. What I couldn't find out is how/where
propagateShrink is actually /used/, other than to implement more
instances of PropagateShrink. I have tracked usage up to the shrink
method for WithArbitraryState2 but then I find no uses of that class
anywhere... and withStateShrinking is also nowhere used.

The MergeableSequence type is quite similar to the old Tree type and
clearly subsumes it. Can we get rid of Tree now and perhaps rename
MergeableSequence to MergeableTree? The Arbitrary.Generic module is now
quite large; does it make sense to move your additions to a separate module?

You have two TODO comments in your code. Are you planning to actually do
something about them? The one in Darcs.Test.Patch.Arbitrary.Named looks
a bit scary to me.

One last remark: there are property-based-testing frameworks out there
that don't require shrinking and automatically find smallest counter
examples. I am not sure they are up to the task for us, but if not I
would like to know why.

__________________________________
Darcs bug tracker <bugs at darcs.net>
<http://bugs.darcs.net/patch1979>
__________________________________
-------------- 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/20200210/a730cd22/attachment.key>


More information about the darcs-devel mailing list