ndmitchell / ndmitchell/hoogle

Hoogle not finding function when I loosen type constraints

Open
#80 5 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

bug
Dominant language
Haskell
Stars
803
Forks
152
PR merge metrics
No merged PRs in 30d

Description

If I perform (with Hoogle v4.2.34) the following search on the command prompt, then I get results :

> hoogle +Data.ByteString.Lazy.Char8 ":: ByteString -> Maybe (Int,ByteString)" | grep readInt
Data.ByteString.Char8 readInt :: ByteString -> Maybe (Int, ByteString)
Data.ByteString.Lazy.Char8 readInt :: ByteString -> Maybe (Int, ByteString)

However if I loosen the typeconstraint to be just :: ByteString then nothing is returned.

> hoogle +Data.ByteString.Lazy.Char8 ":: ByteString" | grep readInt

Is this happening because hoogle is limiting the results returned, and if so is there a way that I can remove this limit? Thanks

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Reproduce the two Hoogle v4.2.34 command-line searches shown in the issue, comparing the constrained query with the looser :: ByteString query. Trace the CLI query handling and result-limit behavior, then verify that the looser search either returns readInt or clearly documents the applicable limit.

Written by the indexing model from the issue text.

Assessment

Tech stack
haskell
Domain
cli, search
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Clearly specified
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.