On 09/05/2021 12:54, Ben Franksen wrote:
>
> New submission from Ben Franksen <ben.franksen@online.de>:
>
> For discussion. IMO the idea of tracking/reporting progress of patch
> application as a monadic effect is sound in principle. This is better than
> doing it with unsafePerformIO as in Darcs.Patch.Progress. The
> D.P.MonadProgress module has "Copyright (C) 2011 Ganesh Sittampalam",
> perhaps you can elaborate how you imagined it to be used?
I'm afraid I don't remember much directly.
Looking in the 'darcs annotate' of the file, it was introduced by this
patch:
> 1: patch fa605983659dd1c4942bbe09b1954e2b8008ce11
> Author: Ganesh Sittampalam <ganesh@earth.li>
> Date: Mon Apr 4 18:45:41 GMT Summer Time 2011
> * generalise type of applyPatches using a new MonadProgress class
And there it looks like I was just abstracting/moving some code that was
already in applyPatches at the time. That function eventually seems to
have ended up in D.R.ApplyPatches.applyPatches which in turn isn't
actually used any more.
I don't exactly know why I did it. I might have had some vision in mind
of mocking it in future. I vaguely recall that around that time I had a
grand plan to abstract all our IO code around type classes so it was
clear what side-effects different code could run, but it never happened.
I doubt it's worth keeping for the sake of it.
|