pursuit icon indicating copy to clipboard operation
pursuit copied to clipboard

Search for NonElementParentNode

Open KAction opened this issue 5 years ago • 2 comments

I was trying to figure out how to create object of type NonElementParentNode, since it is referenced in type of selectElementById. The most oblivious search query:

https://pursuit.purescript.org/search?q=NonElementParentNode

showed only the fact that it is foreign data. What I actually wanted is that I can convert HTMLDocument to it link.

Attempt to search by function signature a -> NonElementParentNode (hello, hoogle) showed totally irrelevant results, like abs :: forall a. Ord a => Ring a => a -> a.

KAction avatar Apr 12 '20 06:04 KAction

<shameless plug>

Use starsuit instead. It works differently than pursuit: it allows you to make queries like A -> NonElementParentNode (yes, with capital A). This query can be described as "something concrete -> NonElementParentNode", rather than "literally forall a. -> NonElementParentNode".

Check out the implementation if you want to understand how exactly search results are sorted.

I use both pursuit and starsuit, they both have pros and cons at processing different types queries.

klntsky avatar Apr 12 '20 09:04 klntsky

Thanks for the report. I agree that with a query of a -> NonElementParentNode, the candidate HTMLDocument -> NonElementParentNode should score higher than forall a. Ord a => Ring a => a -> a.

hdgarrood avatar Apr 12 '20 16:04 hdgarrood