Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Better Detection of Functional Dependencies #2

Open
softmechanics opened this issue Apr 7, 2010 · 0 comments
Open

Better Detection of Functional Dependencies #2

softmechanics opened this issue Apr 7, 2010 · 0 comments

Comments

@softmechanics
Copy link
Owner

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.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant