[RFC] Single rule for `where`
- Dominant language
- Mustache
- Stars
- 20
- Forks
- 2
- PR merge metrics
- No merged PRs in 30d
Description
For now, we have a policy for `where` in the functions, and different rules for other places where `where` is used (e.g. type classes, instances, etc.).
I propose to apply the existing where rule to _all_ `where`s:
```haskell
class Semigroup a
where
(<>) :: a -> a -> a
```
We would have:
a. A single rule – easier to remember
b. Consistent style of `where` usage
c. Solved problem of huge constraints in the type classes definitions
d. Discourage for writing empty `where`s in instances
e. ?
I guess it would have a positive effect. Let me know what you think! 👂🏼
Contributor guide
Research direction
Start by reviewing the existing documented rule for `where` in functions and comparing it with the rules for type classes, instances, and other uses. The work is done when the project decides whether one rule should apply everywhere and the relevant organization guidance reflects that decision.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- haskell
- Domain
- documentation
- Issue type
- Documentation
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 30/100