-
-
Notifications
You must be signed in to change notification settings - Fork 367
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
Use CiInterface/SkInterface for typeclass symbols #1592
Conversation
Just a question: does this affect anything other than icons in auto-completion popup? |
@Ailrun Yes, the document symbol icons (e.g. in the outline and breadcrumbs of the editor) are also updated. |
Oh, right. So it's all about icons, right? |
Yup. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It seems to me that the interface icon is more appropriate, many thanks!
@@ -69,7 +69,7 @@ documentSymbolForDecl (L (RealSrcSpan l) (TyClD _ FamDecl { tcdFam = FamilyDecl | |||
t -> " " <> t | |||
) | |||
, _detail = Just $ pprText fdInfo | |||
, _kind = SkClass | |||
, _kind = SkInterface |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This one is actually for type families, right? I think the PR description is a bit misleading...
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Whoops, you're right, thanks!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is there any reason to leave them as SkClass
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Wasn't entirely sure about type families, but in any case we should do it consistently. Thinking about it, SkInterface
seems more appropriate than SkClass
for type families too, since type families are somewhat analogous to type classes, but over data instead of functions.
What do you think?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🌶️ suggestion: SkFunction
. Isn't a type family really a type-level function? :D
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Oops, I meant to click this one. Thank you for the PR!
Fixes #1581
This branch replaces the
CiClass
/SkClass
item kinds for completions and document symbols withCiInterface
/SkInterface
(see the linked issue for the motivation behind this change).Additionally, the symbol icons for type families which were previously
SkClass
have been replaced withSkFunction
.