Treat variables in type queries same as type wildcards#396
Treat variables in type queries same as type wildcards#396klntsky wants to merge 2 commits intopurescript:masterfrom
Conversation
|
This change invalidates the above comment, right? Although perhaps the fact that #395 was opened in the first place suggests that having a query of |
|
Hm, I suppose the current handling of |
I believe the initial idea was that TypeWildcard in a query is a special case and should match any type without additional penalty aside of
A greater penalty leads to this: IMO the penalty for instantiation should be lower than the penalty for generalization. What about multiplying everything by 2 and charging just 1 for instantiation? |
|
One possible solution is to return negative numbers for exact matches of type constructors: |
|
As for now I updated the comment to reflect the intention behind the proposed fix (though the best way to resolve the issue is not clear IMO). |

fix #395