This is a follow-up on patch2136, particularly
patch 9061d6d7de14d94fca1cdbc16caebbfdeb07bcb9
Author: Ben Franksen <ben.franksen@online.de>
Date: Tue Nov 3 07:42:50 CET 2020
* Darcs.Repository.Job: use Dict to pass dictionaries
1 patch for repository http://darcs.net/screened:
patch a3f232a04aa8da7014e5e995c98d3c4c1afec4e0
Author: Ben Franksen <ben.franksen@online.de>
Date: Tue Mar 23 15:32:03 CET 2021
* decouple IsPrimV1 from ApplyState p ~ Tree, simplify runJob
The extra 'ApplyState p ~ Tree' constraint was only for convenience, the
same effect is achieved with a separate call to checkTree. The rest of the
changes is replacing case matches with 'Dict <- return checkXxx' which I
find leads to more readable code because it avoids extra indentation. And
since all cases of runJob require the 'ApplyState p ~ Tree' constraint
anyway, we can now float the checkTree out of the large case expression.
Looks good. One downside of floating the `checkTree` call is it
makes it more annoying in future to add a job type that doesn't
have `ApplyState p ~ Tree`, but it's not a big deal.