4 ms·
I really appreciate the effort of designing the syntax to match common IDE expectations. However, I think it shouldn't be too difficult to add intellisense for
by sfvisser 6y ago
I really appreciate the effort of designing the syntax to match common IDE expectations. However, I think it shouldn't be too difficult to add intellisense for Haskell-like syntax to IDEs as well. Especially with all the types available!
The only unconventional thing is that the function might be put in-front of the value and some parentheses need to be added, instead of just putting it after the cursor like with method syntax. I assume you get used to that rather quickly.
- pjmlp 6y agoLike Leksah.
- dmitriid 6y ago> I think it shouldn't be too difficult to add intellisense for Haskell-like syntax to IDEs as well. Especially with all the types available! On the contrary, this should give Haskell an advantage because all the types are known and the IDE should be able to autocomplete only the correct parameters. But that requires compiler-as-a-service, and GHC is not. And writing your own analyser for a language is quite a task.
- newen 6y agoIsn’t that why language server protocol is a thing?
- dmitriid 6y agoYup, kudos to MS for coming up with it and standardizing it. (the following is just what I think, I have no hard knowledge on the matter) Language server still limits what an IDE can do. E.g., IDEA can do complex large scale refactoring and analysis over a codebase. If you're brave enough, you can write your own language analyzer that converts your language into structures IDEA understands, and you can get (some) of the same benefits. But it's a lot of work. IIRC, language server can only provide rather superficial type information and autocompletion (which is still way more than many languages had before).
- codygman 6y ago> But that requires compiler-as-a-service, and GHC is not. And writing your own analyser for a language is quite a task. Yep. Haskell-language-server is very nice, though there are some performance issues I've experienced with a template Haskell heavy large codebase. For many cases though, the experiences is very smooth after install. Install issues are close to being sorted out with static binaries being downloaded in the vscode extension for instance.