Timothy Docker writes:
>
> I'm attempting to play with frantk. I found the same problem mentioned
> on deja... but no answer...
>
> When I try and run the demo under hugs, I get...
>
> ....
> Reading file "/home/timd/src/haskell/frantk/src/FranTkSrc/WidgetSetImpl.lhs":
> ERROR "/home/timd/src/haskell/frantk/src/FranTkSrc/WidgetSetImpl.lhs" (line 64):
>Overlapping instances for class "Bindable"
> *** This instance : Bindable Canvas
> *** Overlaps with : Bindable (PWidget a)
> *** Common instance : Bindable Canvas
>
> A suggestion for a direct fix would be nice, but I can't attempt to
> work out what the problem is if I don't understand the error. What is
> an "overlapping instance"?
>
> Thanks,
>
> Tim
It means that when the system sees a class method of Bindable (I'm
guessing there's one called bind) applied to a value of type Canvas
(which must be a synonym for PWidget something, in order for there to
be an overlap), it can't tell whether it's supposed to use the
implementation from `instance Bindable Canvas' or the implementation
from `instance Bindable (PWidget a)'.
Hugs has an extension which you can enable on the command line, to
permit overlapping instances as long as one is strictly more specific
than the other, with the more specific instance's implementations
taking precedence. The message "Common instance : Bindable Canvas"
shows that it's applicable.
HTH
Tom