[darcs-devel] darcs patch: Cache pristine directory within NoPristine.

Juliusz Chroboczek Juliusz.Chroboczek at pps.jussieu.fr
Thu Apr 28 08:32:25 PDT 2005


> I'm not sure that we *want* invalidatePristine.  Couldn't we just update
> the pristine, if we've already got one?

We could.  But we don't want to ;-)

As far as I can see, there's no Darcs command that will call
surely_slurp_Pristine after invalidating a pristine.  In other words,
we could update the pristine, but if we did, we'll never read it anyway.

So it would be safe in practice to never invalidate a pristine.  Think
of invalidatePristine as a belt+suspenders type of thing.

> It does seem like a lazy field and unsafePerformIO would be the way to go
> about this, and then we just have to keep the cache up-to-date if it
> exists.

except that...

> The catch is that we have to be able to *know* if it exists...

on the other hand...

> I'm sure this is a soluble problem

.. but this Haskell newbie has no idea how it can be done.  Feel free
to hack my code into any shape that suits you.

                                        Juliusz




More information about the darcs-devel mailing list