Your use of undecidable instances in this case is fine.
instance (Instance cls obj, Implements cls iface)=>Provides obj iface where
is undecidable because you might have an instance for Instance
or Implements
that in turn relies on Provides
causing a loop.
However, in this case, you don't need the Provides
class at all, because you only give an implementation of it in terms of methods from your other two classes!
You could instead pull provides
and #>
out to be top level functions with the appropriate Instance
and Implements
constraints and you would lose nothing, and avoid the need for the undecidable instance.
You do need/want MPTCs for this however, and that's fine...