Closed sethomsen closed 5 years ago
It seems like the parameter names of a function influences the ability to find instances of setters for records. Specifically any function i make which takes an argument named 'r' cannot determine any setter instances.
`Record X := mkX { A: nat;}.
Instance etaX : Settable _ := mkSettable (pure mkX <*> A).
Definition setA (r : nat) x := x[A := 32].`
It does not matter wetter or not the argument is actually used in the function body, or if it annotated with explicit types.
`Error: Unable to satisfy the following constraints: In environment: r : nat x : X
?Setter : "Setter A"`
setA is defined
Thanks for the report! Fixed by getting a fresh name in SetInstance_t.
SetInstance_t
Description of the problem
It seems like the parameter names of a function influences the ability to find instances of setters for records. Specifically any function i make which takes an argument named 'r' cannot determine any setter instances.
Steps to reproduce
`Record X := mkX { A: nat;}.
Instance etaX : Settable _ := mkSettable (pure mkX <*> A).
Definition setA (r : nat) x := x[A := 32].`
It does not matter wetter or not the argument is actually used in the function body, or if it annotated with explicit types.
Observed behaviour
`Error: Unable to satisfy the following constraints: In environment: r : nat x : X
?Setter : "Setter A"`
Expected behaviour
setA is defined