GADTs are ignored in the newtype hint
Open
Nobody has claimed this yet.
- Dominant language
- Haskell
- Stars
- 1.6k
- Forks
- 210
- PR merge metrics
- No merged PRs in 30d
Description
ghc accepts both
data X where
X :: Int -> X
and
newtype X where
X :: Int -> X
but hlint doesn't suggest using a newtype in this case.
If it is desirable that hlint should make such a suggestion, then this seems easily solvable after/during #645.
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
Review the existing newtype hint implementation and issue #645, then check how hlint parses the shown GADT and newtype declarations accepted by ghc. Done means hlint consistently suggests newtype for the applicable GADT form, with coverage for the reported examples.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- haskell
- Domain
- tooling
- Issue type
- Feature
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100