-
Notifications
You must be signed in to change notification settings - Fork 17
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
Bug: type info broken #112
Comments
This probably derives from the compiler's use of boxes to format types. If the type is incorrectly printed in psci you should open a compiler issue if there isn't one already. I'm not sure it's technically incorrect, it's just vertically formatted, but I really find this formatting unhelpful and hard to read. To be honest it's probably not ideal that the types passed to the editor plugin are formatted with boxes, unless we want to preserve that formatting. To improve tooltips, I think the first thing that would help is type aliases being preserved in the compiler (known issue), then a separate Atom package that provides for better formatted tooltips (current one I use just takes in text). I'd use the standard Atom syntax highlighting for PureScript within the tooltip if we can. |
👍 I have to leave within a minute. I'll open an issue if nobody did it when I get back or tomorrow.
me too
👍
big 👍
I saw that. My fork was mostly temporary. I'll clean the code and open a PR if you consider merging it as an temporary optional type formatting option, but I know that it's more a hack than anything (this being said, it saves me time already) |
btw, it also break the quickfix feature when one try to automatically add type signature |
I didn't know about the side by side thing... The reason the tooltip is messed up, is that I use the compiler's pretty printer and then join all the lines removing trailing whitespace. That of course doesn't work with side by side things |
Per discussion on the linked issue that's not intentional. But your comment that you join all the lines indicates that "we should preserve the pretty printed output" doesn't have as much weight as I thought. I thought the whitespace was being dropped on the editor side. |
I originally decided to do so, becasuse I wanted to show the type in emacs's message buffer which is annoying if it gets bigger then 3 lines. But I also think the same goes for the type popups here, adding a bunch of whitespace makes them very intrusive. |
I think that this one is fixed |
@rvion thanks |
context:
so, I decided to fix those 2 issues and implement
🍏 I got a prototype working fine (on top, the new version, at the bottom, the old version):
🔶 except for one expression 😠
I thought my code was buggy, so I added some html escaping, but nothing worked.
🔴 Then, I saw that the original
type tooltip
was buggy too on rawatom-ide-purescript
:Indeed, if you look at the beginning of the expression, you can see that brackets don't close properly:
so I checked
pulp psci
🔴 🔴 and then I got this.
So I guess the bug is a bit more serious than just atom-ide-purescript
/cc
@kritzcreek
@nwolverson
here is the buggy function
The text was updated successfully, but these errors were encountered: