[darcs-users] Darcs utterly melts my brain: why PatchInfoAnd?

Jason Dagit dagit at codersbase.com
Tue Sep 30 19:47:35 UTC 2008


On Tue, Sep 30, 2008 at 12:36 PM, Simon Michael <simon at joyful.com> wrote:

> Thanks Jason, that does help. So (basic questions here) without type
> witnesses, the type ghc sees (after cpp) might be "p", whereas with type
> witnesses it would be "p x y". That I recognise.
>
> And x and y are the starting and ending contexts ? What would be an
> example of these ?


I'm still writing a document that will eventually be included with the darcs
repo that explains this and more.

Basically, the empty repository has context (), and all other contexts are
derived by applying patches.  A short, but incorrect, definition of context
is "a set of patches".  In actuality many contexts are equivalent even
though the exact set of patches is different.  This is because really a
context should be a set of changes.  We don't have a good definition for
"changes" so instead we use the idea that when you commute patches you get
new patches but they represent the same "changes".

Do you think some day we'll drop the non-type witness option and the cpp
> macros, leaving just straight haskell ?


That would be nice.  I have two thoughts about this:
1) The C() macro does a good job of grouping the things that represent
context.
2) The CPP macro system doesn't like the single quote on the same line as a
macro.
3) It would be a lot of work to remove all the C() macros.

#1 and #2 mean that I'm indifferent about removing it, #3 sways me in the
direction of leaving it in.

I don't know how others feel about it.

Jason
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.osuosl.org/pipermail/darcs-users/attachments/20080930/9d493b51/attachment.htm 


More information about the darcs-users mailing list