You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Aliases (especially recursive) are not expanded in hover tips.
The language server does not crash and stays responsive even when some aliases are recursive.
Actual Behaviour
Recursive aliases get expanded recursively. This behavior in hover tips is not helpful at all because it gets very hard to understand the types.
2. The language server produces "stack overflow" errors in the output and freezes for a few seconds on every file save. Linting and format-on-save become very slow and annoying. Also, file saving does not work 100% of the time.
Try to make a small change, e.g. add some spaces after return in return t and save the changes. The saving and format-on-save are largely delayed and the server produces the error log provided below.
Try hovering the Tree in @param t Tree. The hover tip is recursively expanded and messy as shown above.
Additional Notes
I really need to create recursive data types like trees and doubly-linked lists in my code, but just using an @alias like that gets tedious with the current language server version. If there is a simple workaround, I would love to use that.
Activity
tomlau10 commentedon Oct 27, 2025
Here maybe a related issue where recursive alias causes some problems: #2780
As for your use case, the workaround that I can think of is to define an actual class for each of the subtype 🤔
MarkLagodych commentedon Oct 29, 2025
Thank you, that works!