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.
-- 
David Roundy
Department of Physics
Oregon State University
_______________________________________________
darcs-devel mailing list
darcs-devel@darcs.net
http://lists.osuosl.org/mailman/listinfo/darcs-devel

Reply via email to