ndmitchell / ndmitchell/hoogle
Search results are different when using the command-line
Nobody has claimed this yet.
- Dominant language
- Haskell
- Stars
- 803
- Forks
- 152
- PR merge metrics
- No merged PRs in 30d
Description
On https://www.haskell.org/hoogle/ (link in the readme) searching m (m a) -> m a shows join as first hit.
This matches expectation.
Using the command-line version (hoogle --version -> Hoogle 5.0.17.1, http://hoogle.haskell.org/):
$ hoogle 'm (m a) -> m a'
Darcs.Patch.Witnesses.Unsafe unsafeCoerceP :: a wX wY -> a wB wC
Darcs.Patch.Witnesses.Unsafe unsafeCoercePStart :: a wX1 wY -> a wX2 wY
Darcs.Patch.Witnesses.Unsafe unsafeCoercePEnd :: a wX wY1 -> a wX wY2
Prelude pure :: Applicative f => a -> f a
Control.Applicative pure :: Applicative f => a -> f a
Diagrams.Prelude pure :: Applicative f => a -> f a
CorePrelude pure :: Applicative f => a -> f a
Foundation pure :: Applicative f => a -> f a
CLaSH.Signal signal :: Applicative f => a -> f a
CLaSH.Signal.Internal signal :: Applicative f => a -> f a
-- plus more results not shown, pass --count=20 to see more
Similar results were seen in lambdabot and an entirely different selection on hoogle.haskell.org and stackage.
However, prefixing the search with Monad m => produces saner results:
$ hoogle 'Monad m => m (m a) -> m a'
Control.Monad join :: (Monad m) => m (m a) -> m a
Streaming join :: Monad m => m (m a) -> m a
Haxl.Prelude join :: Monad m => m (m a) -> m a
Intro join :: Monad m => m (m a) -> m a
Codec.Xlsx.Util.Tabular.Imports join :: Monad m => m (m a) -> m a
Control.Monad.HT repeat :: (Monad m) => m a -> m [a]
Control.Monad.Tools repeatM :: Monad m => m a -> m [a]
Control.Monad.Loops untilJust :: Monad m => m (Maybe a) -> m a
Data.Constraint.Unsafe unsafeApplicative :: forall m a . Monad m => (Applicative m => m a) -> m a
Data.Edison.Seq.ListSeq ltailM :: (Monad rm) => [a] -> rm [a]
-- plus more results not shown, pass --count=20 to see more
Is there any specific syntax that makes the command-line behave more like the web version of hoogle on haskell.org and doesn't require prefixing with Monad m =>?
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by reproducing the documented web query and the command-line query shown in the issue, including the version noted there, then compare the results with the prefixed Monad query. No files or tests are named, so trace the CLI query handling and search-ranking entry points. Done means explaining or correcting the discrepancy so equivalent queries behave consistently, or documenting the required syntax.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- haskell
- Domain
- cli, search
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100