pursuit icon indicating copy to clipboard operation
pursuit copied to clipboard

`a -> HTMLElement` and `_ -> HTMLElement` have different results

Open alextes opened this issue 6 years ago • 1 comments

Going by the help page for Pursuit my best guess for finding functions that return something of type HTMLElement was HTMLElement or a -> HTMLElement. Neither gives any results although _ -> HTMLElement does. It is not clear why.

hdgarrood suggested they should perhaps return the same results. For me being able to find a written suggestion to try _ vs. a could also be enough.

Thanks for this awesome docs service 🙏 !

alextes avatar Jul 13 '19 14:07 alextes

The solution is probably to insert

 go (P.TypeVar _ _) t = pure (typeComplexity t)

below this line.

In my adaptation of this algorithm I considered all three cases:

  • variable substitution
  • variable instantiation
  • type generalization by a type variable

In pursuit, the third case is not considered.

Most likely this issue is a low-hanging fruit.

klntsky avatar Jul 13 '19 14:07 klntsky