[darcs-devel] [patch1997] index: fix import layout (and 8 more)
Ben Franksen
bugs at darcs.net
Fri Feb 28 00:18:02 UTC 2020
Ben Franksen <ben.franksen at online.de> added the comment:
>> * index: no longer rely on the special behavior of appendPath
>
>> - then dirlength state -- must be 0 in this case
>> + Nothing -> dirlength state
>
> Isn't that "must be 0" comment still valid?
Hm, yes. Can't remember why I removed it. Should probably re-add.
>> - tree' = makeTree [ (n, fromJust $ treeitem s) | (n, s) <- inferiors, isJust $ treeitem s ]
>> + tree' = makeTree [ (n, fromJust $ treeitem s) | (Just n, s) <- inferiors, isJust $ treeitem s ]
>
> What's going on here, i.e. how do we know it isn't a behaviour change?
We change the type of 'nameof' to return Maybe, where Nothing is
returned only for the root item. The 'inferiors' in the above snippet is
a bad name for 'subtrees' and is the result of calling 'subs $ start
substate' a few lines above that code. 'subs' in turn recursively
enumerates the "states" (think of a state as a cursor) pointing to the
subitems under the current one. It in turn calls 'nameof' which must
return Just because by definiton sub items are not the root item.
Clear now?
__________________________________
Darcs bug tracker <bugs at darcs.net>
<http://bugs.darcs.net/patch1997>
__________________________________
-------------- 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/20200228/a541e3c6/attachment-0001.key>
More information about the darcs-devel
mailing list