-
-
Notifications
You must be signed in to change notification settings - Fork 370
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Suggestions or actions to use type synonyms #506
Comments
Is there still interest in this feature? I would be interested in working on it. |
Yes, absolutely!
…On Thu, Mar 4, 2021, 2:33 AM Michalis Pardalos ***@***.***> wrote:
Is there still interest in this feature?
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
<#506 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AAGRJXGRGGJQ4JU2J7WTKQ3TBZ6GTANCNFSM4STFC7LA>
.
|
This seems maybe like something that ought to be in hlint? |
This can't really be in HLint, since sometimes type synonyms have semantic information that HLint just can't know. For example, |
It would be great to have code actions in both directions:
|
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 actionDefine funArity :: Fix (Compose (Ann SrcSpan) NExprF) -> Int
I end up with the unhuman given type sig, whenfunArity :: 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:
(Better but more difficult would be to calculate the preference in existing code (user and library) between the synonym and the expanded version)
The text was updated successfully, but these errors were encountered: