[darcs-devel] [patch1745] use AnchoredPath instead of FileName for... (and 8 more)
Ganesh Sittampalam
bugs at darcs.net
Sat Nov 17 13:19:26 UTC 2018
Ganesh Sittampalam <ganesh at earth.li> added the comment:
> * use AnchoredPath instead of FileName for internal path representation
> -- | For displaying paths to the user. This adds the "./" for consistency
> -- with how repo paths are displayed by 'showPatch' and friends.
> -- At some point point in the future we may decide to change this.
> displayPath :: AnchoredPath -> FilePath
> displayPath = anchorPath "."
I guess that displayPath is never to be used for the on-disk patch format?
It might be worth clarifying that explicitly in the comment if so (I can
do it if you confirm that's true).
> explodePaths :: Tree IO -> [AnchoredPath] -> [AnchoredPath]
> explodePaths tree paths = concatMap (explodePath tree) paths
> explodePath :: Tree m -> AnchoredPath -> [AnchoredPath]
> explodePath tree path =
> path : maybe [] (map (catPaths path . fst) . list) (findTree tree path)
Could you give these some haddocks? I think from the usage that it's
just about traversing a directory recursively, but it's not obvious
from the definition.
Overall the patch looks fine. Thanks for keeping it relatively small. I still
didn't manage to check every detail, but the overall description of the
change in the patch comment sounds good to me, and I've confirmed that the
actual changes seem to match that description.
----------
status: needs-review -> review-in-progress
__________________________________
Darcs bug tracker <bugs at darcs.net>
<http://bugs.darcs.net/patch1745>
__________________________________
More information about the darcs-devel
mailing list