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

Jason Dagit dagit at codersbase.com
Tue Aug 5 16:43:47 UTC 2008


On Tue, Aug 5, 2008 at 9:36 AM, David Roundy <droundy at darcs.net> wrote:

> On Tue, Aug 05, 2008 at 08:01:30AM -0700, Jason Dagit wrote:
> > This is a resend that should fix the conflicting edits we have in
> > src/Darcs/Match.lhs.
> >
> > Still not finished, but it should be easier for you to play with
> > than the previous patch.
>
>
> > hunk ./src/Darcs/Repository/Internal.lhs 701
> > -withRepository :: [DarcsFlag] -> (forall p. RepoPatch p => Repository p
> -> IO a) -> IO a
> > +withRepository :: forall a p. RepoPatch p => [DarcsFlag] -> (FORALL(r u
> t) Repository p C(r u t) -> IO a) -> IO a
> >  withRepository opts1 = withRepositoryDirectory opts1 "."
>
> Here's the main problem that keeps this from compiling without type
> witnesses:  you've removed the second-rank polymorphism from
> withRepository and friends, which breaks these functions (this and
> withRepoLock).  This function needs to be
>
> withRepository :: [DarcsFlag]
>               -> (forall p C(r u t). RepoPatch p => Repository p C(r u t)
> -> IO a)
>               -> IO a
>
> but this won't compile without other changes.


Ah, right I forgot that moving that type variable would have such drastic
implications.  I'll move it back and see how I can fix the ensuing errors.

Thanks,
Jason
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.osuosl.org/pipermail/darcs-users/attachments/20080805/c17b01bc/attachment.htm 


More information about the darcs-users mailing list