[darcs-devel] [patch2163] substantial rewrite of 'darcs test'
Ben Franksen
bugs at darcs.net
Mon Apr 19 12:01:24 UTC 2021
Ben Franksen <ben.franksen at online.de> added the comment:
> * follow the mtl a bit more for ReaderT
>
> - move it to Darcs.Util.IndexedMonad
> - introduce a MonadReader class and 'asks'
> - use a record for TestingEnv so we can use asks
>
> This one gets rid of testableToRL. The only places
> it was used were to convert a Testable before calling
> applyRL. Now I've made the concept of "indexed" apply
> work on several container types (RL, FL, Testable) so
> this conversion isn't needed.
Nice. Indeed it is now clear that conversion from Testable is indeed
only needed directly after running all the tests.
> It does introduce some extra constraints for reasons
> explained in a comment on TestRunnerPatchReqs, and
> also in the unit tests I had to introduce an 'IndexedApply'
> class because there is no code for the testing patch
> types to operate on non-indexed monads.
Not so nice, but for the time being I can live with that ugliness.
I still think that Testable is a poor name. It really is a generic patch
container type that has nothing to do with testing per se. In fact it's
a binary (leaf) tree of patches in application order. I don't mean it
should go into Darcs.Patch.Witnesses yet, but the name should reflect
what it is, not what we happen to use it for.
__________________________________
Darcs bug tracker <bugs at darcs.net>
<http://bugs.darcs.net/patch2163>
__________________________________
More information about the darcs-devel
mailing list