[darcs-users] darcs patch: Add more type witnesses

David Roundy droundy at darcs.net
Tue Aug 5 17:01:17 UTC 2008


Just to reiterate what I sent in different emails:

On Mon, Aug 04, 2008 at 09:11:23PM -0700, Jason Dagit wrote:
> David,
> 
> I fully expect this patch to be amend-recorded before it's accepted but I have
> 2 reasons to send it now:
> 
> * I want to duplicate it for archive/backup purposes
> * I have some questions about how it's coming along
>
> In src/Darcs/Repository/Internal.lhs, there is remove_from_unrevert_context
> which still doesn't type check.  There is a "FIXME" on the offending line.
> I tried what you suggested, but this guy is still not right.  Probably because
> unrevert_patch_bundle returns a SealedPatchSet, but this looks to me like
> a tricky function and I could use some help with it.

I've sent in a patch fixing this.

> In the meantime, I've gone far beyond Internal.lhs with type witnesses.  I've
> nearly made it into src/Darcs/Commands/*.  Which means we almost have the
> check of type witnesses end to end!

Yay!

> Another thing that came up was that some of the places in the code started
> needing disambiguation of patch type.  Usually it would happen with things
> like read_repo that operate on any RepoPatch p.  GHC started telling me that
> p was ambiguous.  I, at least temporarily, started throwing in some seemingly
> arbitrary type such as Patch for p just to move on.  Do you have any idea
> what causes this?  I've been doing my development on 6.8 and I haven't ruled
> that out as a cause, except that it didn't happen in the past when compiling
> without type witnesses on 6.8, so I doubt 6.8 is to blame.

This is a bug in withRepository and friends, which need to be
second-rank polymorphic.

David


More information about the darcs-users mailing list