kowainik / kowainik/stan

STAN-0302 is triggered on long contexts

Open
#505 2 comments 0 reactions 0 assignees View on GitHub
Dominant language
Haskell
Stars
597
Forks
53
PR merge metrics
No merged PRs in 30d

Description

The following code:

```
type Differentiable f =
( Functor f,
GenericK f,
GDifferentiable (RepK f),
GBifunctor (GDiff (RepK f))
)
```

triggers this message from stan in HLS:

```
✲ Name: Big tuples
✲ Description: Using tuples of big size (>= 4) can decrease code readability
✲ Severity: Style
✲ Category: #AntiPattern #Syntax
Possible solutions:
- Consider defining and using a custom data type to improve code comprehension
stan(STAN-0302)
```

However, this is not a tuple. It is a context, and there is no way to define a custom data type to improve code comprehension.

Contributor guide

Open the contributing guide

Research direction

Start by reproducing STAN-0302 with the Differentiable context shown in the issue and inspect the rule's implementation and existing tests. Done means this context is no longer reported as a big tuple while actual large tuples continue to receive the intended diagnostic.

Written by the indexing model from the issue text.

Assessment

Tech stack
haskell
Domain
devtools
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.