[darcs-devel] [patch1880] decouple RepoPatchV3 impl from NamedPrim
Ben Franksen
bugs at darcs.net
Tue Aug 27 15:12:09 UTC 2019
Ben Franksen <ben.franksen at online.de> added the comment:
> This also distinguishes a case that ought to be an internal error,
> but the unit tests seem to rely on it, so this is left as a
> TODO for now.
I think this is because Darcs.Test.Patch.Arbitrary.NamedPrim.aPatchId
does not generate unique IDs. We cannot guarantee uniqueness because the
Gen monad from QuickCheck doesn't allow us to thread a (user defined)
state through the actions. There is
http://hackage.haskell.org/package/QuickCheck-GenT but to use that we'd
have to switch to GenT everywhere in the harness.
For RepoPatchV3 I have used the fromAnonymousPrim hack to generate
random PrimPatchIds. These have a very low probability of colliding.
__________________________________
Darcs bug tracker <bugs at darcs.net>
<http://bugs.darcs.net/patch1880>
__________________________________
More information about the darcs-devel
mailing list