On Fri, Feb 15, 2008 at 10:58 AM, David Roundy <[EMAIL PROTECTED]> wrote: > On Fri, Feb 15, 2008 at 10:18:04AM -0800, Jason Dagit wrote: > > Sun Feb 10 01:00:34 PST 2008 Jason Dagit <[EMAIL PROTECTED]> > > * make Hopefully have type witnesses > > Thanks! This looks good, but I've got one question... > > > \begin{code} > > -get_common_and_uncommon :: RepoPatch p => (PatchSet p C(x),PatchSet p > C(y)) -> > > - ([PatchInfo],(RL (RL (PatchInfoAnd p)) :\/: RL > (RL (PatchInfoAnd p))) C(x y)) > > -get_common_and_uncommon_or_missing :: RepoPatch p => (PatchSet p > C(x),PatchSet p C(y)) -> > > - Either PatchInfo ([PatchInfo],(RL > (RL (PatchInfoAnd p)) :\/: RL (RL (PatchInfoAnd p))) C(x y)) > > +get_common_and_uncommon :: (RepoPatch p, (Invert (PatchInfoAnd p))) > > + => (PatchSet p C(x),PatchSet p C(y)) > > + -> ([PatchInfo],(RL (RL (PatchInfoAnd p)) :\/: RL > (RL (PatchInfoAnd p))) C(x y)) > > +get_common_and_uncommon_or_missing :: (RepoPatch p, (Invert (PatchInfoAnd > p))) > > + => (PatchSet p C(x),PatchSet p C(y)) > > + -> Either PatchInfo ([PatchInfo],(RL > (RL (PatchInfoAnd p)) :\/: RL (RL (PatchInfoAnd p))) C(x y)) > > Why is this Invert instance required here? It seems to me like the compiler > ought to be able to infer from RepoPatch p that (Invert (PatchInfoAnd > p))... > > I haven't actually looked into why this instance isn't inferred, since I > thought I'd run it by you first.
I actually don't know either. I did have to change some instances in HopefullyPrivate.lhs. Maybe doing so in there requires that I change the instance of RepoPatch. >From the sounds of it, RepoPatch is intended to take care of this Invert instance? I'll look at fixing that. Jason _______________________________________________ darcs-devel mailing list darcs-devel@darcs.net http://lists.osuosl.org/mailman/listinfo/darcs-devel