Open isovector opened 4 years ago
This is actually quite a blocker on my book; I'll see about implementing a solution today, but would love any insight you might have here, Nick!
Reopening, because this is also an issue when printing equations in "normal" mode.
I think if we want to solve this in all cases, we have to take the generated equation (without type annotations) and do type inference on it. Then add extra type annotations so that the inferred type matches up with the actual type of the discovered law.
Consider the following signature:
which produces the following output:
But uh oh! This code is ambiguous in
a
!I think the solution is to give an explicit type to any term that isn't applied to a quantified variable (variables always get types when bound in the lambda.)