Skip to content

Better Detection of Functional Dependencies #2

@softmechanics

Description

@softmechanics
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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions