purescript / pursuit

Website for hosting and searching PureScript API documentation
https://pursuit.purescript.org/
Other
169 stars 47 forks source link

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

Open alextes opened 5 years ago

alextes commented 5 years ago

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 🙏 !

klntsky commented 5 years ago

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:

In pursuit, the third case is not considered.

Most likely this issue is a low-hanging fruit.