haskell / haskell/haskell-language-server
Suggestions or actions to use type synonyms
- Langage dominant
- Haskell
- Étoiles
- 3k
- Forks
- 455
- Merge moyen
- 2 j 19 h
- PR mergées (30 j)
- 11
Description
It would perhaps be nice if HLS suggested using in scope type synonyms sometimes.
To make an example using the `hnix` package: if I use the excellent code action `Define funArity :: Fix (Compose (Ann SrcSpan) NExprF) -> Int` I end up with the unhuman given type sig, when `funArity :: NExprLoc -> Int` would be much nicer.
It's probably quite hard to come up with the perfect rule here, but how do people feel about a heuristic along the lines of:
- The sig is in scope
- The types are equal
- Using the synonym is much shorter
(Better but more difficult would be to calculate the preference in existing code (user and library) between the synonym and the expanded version)
Guide de contribution
Aucun guide de contribution indexé pour ce dépôt
Évaluation
Cette issue n'a pas encore été évaluée.