[darcs-devel] [patch1823] v3: basic implementation and tests

Ganesh Sittampalam bugs at darcs.net
Sat Jun 15 11:07:39 UTC 2019


Ganesh Sittampalam <ganesh at earth.li> added the comment:

>> Actually, a followup thought is do we really need this slightly
>> opaque encoding, or could we use a Bool like PatchInfo has?
> 
> We certainly could. But we'd still have to maintain an invariant 
> (>=0). I tried to minimize the memory footprint here. Note this
> gets attached to /every/ single prim patch (if it is part of
> a RepoPatchV3).

Isn't it just that the numbers need to be unique amongst all the 
primitives with the same named patch, even if in practice we
allocate them as positive numbers?

One alternative if keeping the efficiency is important would be to 
protect the representation by not exporting the constructor of 
NamedPrim.

__________________________________
Darcs bug tracker <bugs at darcs.net>
<http://bugs.darcs.net/patch1823>
__________________________________


More information about the darcs-devel mailing list