ndmitchell / ndmitchell/hoogle

Hoogling signatures with constraints

Open
#213 2 comments 4 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

I think it would be a nice feature if hoogle could show results for signatures with matching types but additional constraints. Say I hoogle

(a -> b) -> f a -> f b

I would like for hoogle to suggest fmap. Also, it would be nice if hoogle was aware of subclass relationships so that the above would also be shown if I hoogle, say

Applicative f => (a -> b) -> f a -> f b

Any thoughts?

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

Start by locating Hoogle's signature-matching and type-constraint handling, then trace how query results are selected. Done means a query for (a -> b) -> f a -> f b can suggest fmap, and an equivalent query with an Applicative f constraint also accounts for the subclass relationship.

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.