4 ms·
On what editor setup you get this kind of functionality with Haskell? I mean the auto-insert of the inferred types.
by hopia 7y ago
On what editor setup you get this kind of functionality with Haskell? I mean the auto-insert of the inferred types.
- chongli 7y agoI’ve been out of the game for a number of years but I used something called ghc-mod [1] with its associated vim plugin [2] to get this functionality. Moving forward, it seems that all of the effort has moved over to Haskell IDE Engine [3]. It looks like this exact feature hasn’t been brought over yet but it is planned. In the mean time you could still use ghc-mod though. [1] https://github.com/DanielG/ghc-mod https://github.com/DanielG/ghc-mod [2] https://github.com/eagletmt/ghcmod-vim https://github.com/eagletmt/ghcmod-vim [3] https://github.com/haskell/haskell-ide-engine https://github.com/haskell/haskell-ide-engine
- hopia 7y agoThanks for the tip! Haskell IDE engine is exactly what I've been using til now and would've been very pleased to find out it had such a convenient feature. Ghcide is on my list to try next as it's gotten a lot of attention lately.
- jose_zap 7y agoYes, it already has a code command to automatically add top level type annotations. The caveat I that it can only work if you add -Wall to your compilations flags.
- danidiaz 7y agoIt seems that "ghcide" can do this: https://twitter.com/chris__martin/status/1218331415869190144 https://twitter.com/chris__martin/status/1218331415869190144 https://github.com/digital-asset/ghcide https://github.com/digital-asset/ghcide
- pwm 7y agoRecent ghcide can do it now as well as https://github.com/mpickering/apply-refact https://github.com/mpickering/apply-refact for hlint