ndmitchell / ndmitchell/hlint

Invalid suggestion (type incorrect)

Open
#980 7 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

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

Description

This started happening recently:

$ cat a.hs
infixl 8 ^.
a ^. b = error "undefined"

t a = a ^. 1 ^. 1
$ hlint --version
HLint v2.2.11, (C) Neil Mitchell 2006-2020
$ hlint a.hs
a.hs:4:11: Warning: Use .
Found:
  a ^. 1 ^. 1
Perhaps:
  a ^. (1 . 1)

1 hint

The suggestion doesn't type check.

Perhaps its a breakage in an upstream tool? (Looks like maybe the parser is doing something funky that throws hlint off.) Happy to provide more details.

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 issue with the a.hs example and run hlint --version followed by hlint a.hs. Trace how the suggestion for a ^. 1 ^. 1 is generated; done means the reported suggestion type-checks or is no longer emitted, with a regression test covering the example.

Written by the indexing model from the issue text.

Assessment

Tech stack
haskell
Domain
tooling
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
42/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.