class A a b | a -> b where {}
instance (A a b, B b) => Test a
instance (A a b, C b) => Test a
In order to choose an instance of Test, we need to A to "resolve" b to a type, and update references to b when checking B and C.
This is partially complete, with the following todos:
- Only allow classes with functional dependencies to resolve types.
- Only resolve types for which all dependencies are known types (not variables). In the case of A, only resolve b if a is known.
In order to choose an instance of Test, we need to A to "resolve" b to a type, and update references to b when checking B and C.
This is partially complete, with the following todos: