Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
redirect to hoogle search page when search returns more than one resu…
…lt (OctoLinker#470) Changes I made on @kfigiela PR's introduced a bug. > This simplification is not correct. Note that we use `apiUrl` for JSON API lookup. However, in case that more than one package provides module with the same name I redirect to search page that indicates matches (`hoogleSearchUrl` that lacks `&mode=json` parameter). Now it redirects to JSON response. > Example use case: follow `Net.IPv4` import on https://github.com/rlupton20/vanguard-dataplane/blob/293e2e34c31b17051baa5cf02824c275aa82e772/app/Debug/PacketParsing/IP4.hs > Now it redirects to https://hoogle.haskell.org/?hoogle=Net.IPv4%20is:module%20is:exact&mode=json which is not very useful, however search page looks better https://hoogle.haskell.org/?hoogle=Net.IPv4%20is:module%20is:exact https://github.com/OctoLinker/OctoLinker/pull/463/files/46bb18a84a3ef26ce3e37862e5e3e9e915b541e3..cc7fc70f55b40522432af6e594bcf239ca8e7fd7#r192562811
- Loading branch information