ndmitchell / ndmitchell/hlint

Add concept of isomorphisms to hints?

Open
#359 2 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Haskell
Stars
1.6k
Forks
210
PR merge metrics
No merged PRs in 30d

Description

There are many hints that are split into multiple definitions, such as:

- warn: {lhs: isLower a || isUpper a, rhs: isAlpha a}
- warn: {lhs: isUpper a || isLower a, rhs: isAlpha a}

It would be nice to be able to declare isomorphic expressions only once, e.g. x || y = y || x, mapM_ = flip forM_, etc, and have hints automagically exploded into all equivalent versions. Has this idea been explored before?

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 reviewing how HLint represents and expands hint definitions, then search for existing handling of equivalent expressions. Determine whether declaring isomorphisms such as commutativity or function equivalence can be supported without ambiguous or excessive hint expansion. Done means the design is agreed and equivalent hint forms are generated consistently, with tests covering the examples in the issue.

Written by the indexing model from the issue text.

Assessment

Tech stack
haskell
Domain
tooling
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
20/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.