Is it possible to add HLint rule to require INLINABLE
Nobody has claimed this yet.
- Dominant language
- Haskell
- Stars
- 1.6k
- Forks
- 210
- PR merge metrics
- No merged PRs in 30d
Description
Say I have type-class
class Foo a where
foo :: MonadFoo m => m a
I'd want to require that all foo = bindings have {-# INLINABLE foo #-} (or INLINE) in the same scope. AFAIU this cannot be implement as user hint.
instance Foo Int where
foo = ...
{-# INLINABLE foo #-}
I'll be perfectly happy if all foo = should have {-# INLINABLE foo #-} attached, independencly if they are actually instance methods or not. It would be my problem to turn false positives (I doubt I'll have local variables named foo e.g.).
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
Start by tracing how HLint represents user hints and how it identifies function bindings and pragmas. Define the rule's scope from the examples: report bindings named foo that lack an attached INLINABLE or INLINE pragma, including instance methods, and add coverage for the shown class and instance forms.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- haskell
- Domain
- tooling
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100