This has been on my TODO list for ages. The move is by no means
complete, the two patches cover mostly D.R.Hashed and D.R.State. There
are many many places where we use String literals for constant repo
paths. But it is a beginning and I plan to eventually concentrate all
repo path constants there.
2 patches for repository http://darcs.net/screened:
patch ff0052938c539ce44be694fd94002ab5c34357d4
Author: Ben Franksen <ben.franksen@online.de>
Date: Tue Jun 19 22:39:30 CEST 2018
* define repo paths in a separate module
patch c42884df5b78037b04ea6ee3a1db3356f3e57c06
Author: Ben Franksen <ben.franksen@online.de>
Date: Tue Jun 19 22:43:59 CEST 2018
* simplify readRecorded and readPending
...using peekPristineHash and the new D.R.Paths module.
> * define repo paths in a separate module
Looks good
> * simplify readRecorded and readPending
>- case linesInv of
>- [] -> return emptyTree
You've dropped this case in the readRecorded refactor.
I can't think of any reason the case can arise though,
given an empty repo still has a pristine hash.
>> * simplify readRecorded and readPending
>
>> - case linesInv of
>> - [] -> return emptyTree
>
> You've dropped this case in the readRecorded refactor.
> I can't think of any reason the case can arise though,
> given an empty repo still has a pristine hash.
Exactly my reasoning :-;