[darcs-devel] [patch1665] Many refactorings and cleanups, mostly for Darcs.Repository.Hashed

Ben Franksen bugs at darcs.net
Sun Mar 18 23:28:20 UTC 2018


New submission from Ben Franksen <ben.franksen at online.de>:

Many refactorings and cleanups, mostly for Darcs.Repository.Hashed. The
most drastic measure is to decouple the code that handles parsing and
unparsing of inventories into its own module Darcs.Repository.Inventory
and to create appropriate data types. I also added properties and unit
tests.

There remains a lot to be done in this area but I think this is already
an improvement and it passes all tests. As usual I got side-tracked with
an experimental change, in this case a new parsing library for darcs
with the ability to return partially parsed values. The main use case
would be the extraction of the pristine hash of a head inventory without
having to parse all the rest of the content. This is currently done with
ad-hoc functions which I renamed to peekPristineHash, pokePristineHash,
and skipPristineHash.

I'll write more about this in a separate message to the list.

13 patches for repository http://darcs.net/screened:

patch 76f5a3e21f7d1b94ac392b91bfe3e19ed2689c87
Author: Ben Franksen <ben.franksen at online.de>
Date:   Sun Mar 11 10:21:22 CET 2018
  * add prefsDir and prefsDirPath, similar to constants defined in
D.R.Hashed

patch 820f125a4a14892f466b5835aa195c97d829d77e
Author: Ben Franksen <ben.franksen at online.de>
Date:   Sun Mar 11 10:23:26 CET 2018
  * renamed inv2pris -> peekPristineHash

patch 56abe25ec95df0f9ff46b2f255d88bac268374c5
Author: Ben Franksen <ben.franksen at online.de>
Date:   Sun Mar 11 10:27:09 CET 2018
  * export constants for repo subpaths in D.R.Hashed, use them in D.R.Create

patch 16e75cb7b2060abc3c63545493fe06f381a8b9e1
Author: Ben Franksen <ben.franksen at online.de>
Date:   Sun Mar 11 12:09:26 CET 2018
  * use makeDarcsdirPath and path constants in D.R.Hashed

patch 2510b28c8f7a28d47f58e1273007bca39dc58446
Author: Ben Franksen <ben.franksen at online.de>
Date:   Sat Mar 10 12:35:51 CET 2018
  * cleaned up set/unset in D.R.Hashed and optimize command
  
  This mess should never have passed patch review, if you ask me.

patch 16cef7605717d670f63f30b4eaba53f97e5d9355
Author: Ben Franksen <ben.franksen at online.de>
Date:   Sun Mar 11 10:15:55 CET 2018
  * export the type SM from ReadMonads and reformat export list

patch 5deabd7c9657f61bcd52f406fb838adf130a9ccf
Author: Ben Franksen <ben.franksen at online.de>
Date:   Sun Mar 11 11:38:15 CET 2018
  * factor D.R.Hashed.Inventory out of D.R.Hashed, add data type for
inventories
  
  This is a first step to making the huge D.R.Hashed more modular.

patch d49fa3b34bd251194138b6ab6fa91644e54819e3
Author: Ben Franksen <ben.franksen at online.de>
Date:   Sun Mar 11 12:38:55 CET 2018
  * add DirLayout data type to abstrcat over plain vs. bucketed in
D.R.Hashed

patch 2e1caa54e72b7743e809f497a345ccccd5dc8595
Author: Ben Franksen <ben.franksen at online.de>
Date:   Tue Mar 13 00:12:04 CET 2018
  * add properties and unit tests for D.R.Inventory
  
  For the usual parse/show roundtrip property we need a newtype wrapper for
  Strings that are valid hashes according to D.R.Cache.okayHash; which is a
  good idea anyway, so we expose ValidHash as part of the Inventory type.

patch 424a014d9faf5ffc5d3a98304777623aa4cef517
Author: Ben Franksen <ben.franksen at online.de>
Date:   Tue Mar 13 10:02:45 CET 2018
  * add -fno-warn-orphans for the whole test suite
  
  ...and remove the individual OPTIONS_GHC pragmas with the same effect. For
  an executable,orphan instances are not a serious problem and we use
them in
  quite a lot of places.

patch c3a78de013d89cd82a03ea36bceeae3ec088683a
Author: Ben Franksen <ben.franksen at online.de>
Date:   Sat Mar 17 14:42:22 CET 2018
  * cleanups in D.R.Inventory (layout, comments)

patch 0d3a18aa57e7a8d06816709c3874a41852404cb7
Author: Ben Franksen <ben.franksen at online.de>
Date:   Tue Mar 13 14:02:11 CET 2018
  * pass the full path name of the head inventory to
readInventoryPrivate/Local

patch fc550ff9fdaac398804ade878a0eba7c2e8795f6
Author: Ben Franksen <ben.franksen at online.de>
Date:   Sun Mar 18 23:18:28 CET 2018
  * fix, adapt, and add haddocks in D.R.Hashed

----------
files: add-prefsdir-and-prefsdirpath_-similar-to-constants-defined-in-d_r_hashed.dpatch
messages: 19988
nosy: bf
status: needs-screening
title: Many refactorings and cleanups, mostly for Darcs.Repository.Hashed

__________________________________
Darcs bug tracker <bugs at darcs.net>
<http://bugs.darcs.net/patch1665>
__________________________________
-------------- next part --------------
A non-text attachment was scrubbed...
Name: add-prefsdir-and-prefsdirpath_-similar-to-constants-defined-in-d_r_hashed.dpatch
Type: application/x-darcs-patch
Size: 106013 bytes
Desc: not available
URL: <http://lists.osuosl.org/pipermail/darcs-devel/attachments/20180318/f43d486a/attachment-0001.bin>


More information about the darcs-devel mailing list