ndmitchell / ndmitchell/hoogle

Regular Expression in text searches?

Open
#199 4 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

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

Description

First off, thanks for all the hard work! Hoogle has helped me out many times :)

I just came across a problem of converting from one datatype to another. Hoogle to the rescue! -- stack hoogle ':: SubExp -> PrimExp'

However, as this gave me many results, I wanted to narrow down to functions that contained either to or from in their name. However, I needed to do two searches stack hoogle 'to :: SubExp -> PrimExp' and stack hoogle 'from :: SubExp -> PrimExp' to achive that.

It could be nice if I could do the following: stack hoogle '(to|from) :: SubExp -> PrimExp'

I guess allowing regular expressions for type searching would be a mess, so I'm guessing there might be some caveats, but I wanted to hear your thoughts on it anyway.


edit: from the commandline I can actually just use grep, but from the web interface it is not that easy.

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

The issue mentions Hoogle's command-line query and web interface, but names no files or tests. Start by tracing how text queries are handled in those two entry points; define how regex grouping such as (to|from) should interact with type searches, then verify the behavior in both interfaces.

Written by the indexing model from the issue text.

Assessment

Tech stack
haskell
Domain
search
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.