[darcs-users] darcs patch: change the type of gcau to reflect its b... (and 10 more)

Jason Dagit dagit at codersbase.com
Sun Sep 27 15:25:26 UTC 2009

On Sun, Sep 27, 2009 at 7:50 AM, Ganesh Sittampalam <ganesh at earth.li> wrote:

> On Thu, 17 Sep 2009, Petr Rockai wrote:
>  I'm running out of time, I'll look at the rest later (hopefully tomorrow,
>> or over the weekend).
>>> [add witnesses to Darcs.Commands.Diff
>>> [add witnesses to Darcs.Commands.Remove
>>> [add witnesses to Darcs.Commands.TrackDown
>>> [add witnesses to Darcs.Commands.Pull
>>> [add witnesses to Darcs.Commands.Apply
>>> [add witnesses to Darcs.Commands.Push
>>> [need RankNTypes for some of the newly witnessed modules
>>> [add newly-witnessed modules to witnesses.hs
> Could someone look at these patches soon please? I think they're quite
> simple but not having them applied is a bit of a pain for other work I want
> to submit.

Hi Ganesh!

Sorry for not looking at these sooner.  I lost them (both mentally and in my

Looking now.

[add witnesses to Darcs.Commands.Diff]

Looks good.

[add witnesses to Darcs.Commands.Remove]

I want to understand make_remove_patch better:
+make_remove_patch :: RepoPatch p => Repository p C(r u t) -> [SubPath] ->
IO (FL Prim C(x x))

So the remove patch which is created takes the repository from some context
x to the same context?  So the patch sequence it returns has the overall
effect of identity?  Also, why is that sequence unrelated to the
repository's state?  Should the type be something like:
+make_remove_patch :: RepoPatch p => Repository p C(r u t) -> [SubPath] ->
IO (Sealed (FL Prim C(r)))

Which would say that the remove patch starts at the recorded state and ends
in some new state.

Digging into the patch bundle I sent way back when to accomplish a similar
goal, I see that I gave it this signature:
+make_remove_patch :: RepoPatch p => Repository p C(r u t) -> [SubPath] ->
IO ((FL Prim) C(u y))

I'm not saying my version is correct, but it seems there may be more than
one way to do this.  Ah ha, digging deeper into the patches I submitted I
later changed it to this version:
+make_remove_patch :: RepoPatch p => Repository p C(r u t) -> [SubPath] ->
IO (Sealed ((FL Prim) C(u)))

If you'd like to reference my patch bundle the link is here:

Which is part of this thread:

Moving on.

[add witnesses to Darcs.Commands.TrackDown]

Looks good.

[add witnesses to Darcs.Commands.Pull]

Looks good.

[add witnesses to Darcs.Commands.Apply]

Looks good.

[add witnesses to Darcs.Commands.Push]

Looks odd, but if it fixes a compile error then I'm okay with it.

[add witnesses to Darcs.Commands.Send]

Looks okay.

[need RankNTypes for some of the newly witnessed modules]

This looks just like a patch I recently sent to Petr for darcs-hs.  In other
words, it's good.

[add newly-witnessed modules to witnesses.hs]

Depends on previous patches here.

If you amend [add witnesses to Darcs.Commands.Remove], then I say we can
push the whole thing.

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osuosl.org/pipermail/darcs-users/attachments/20090927/c916cfd3/attachment.htm>

More information about the darcs-users mailing list