Re:Dynamic type systems are not inherently more open
by hopia on Sunday January 19, 2020 @10:00AM
(#22091740)
On what editor setup you get this kind of functionality with Haskell? I mean the auto-insert of the inferred types.
[ Parent
| on HN ]
Re:Dynamic type systems are not inherently more open
by chongli on Sunday January 19, 2020 @10:10AM
(#22091795)
I’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
Re:Dynamic type systems are not inherently more open
by hopia on Sunday January 19, 2020 @10:19AM
(#22091842)
Thanks 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.
Re:Dynamic type systems are not inherently more open
by jose_zap on Sunday January 19, 2020 @02:39PM
(#22093469)
Yes, 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.
Re:Dynamic type systems are not inherently more open
by danidiaz on Sunday January 19, 2020 @10:14AM
(#22091817)
It seems that "ghcide" can do this: https://twitter.com/chris__martin/status/1218331415869190144 https://github.com/digital-asset/ghcide
Re:Dynamic type systems are not inherently more open
by hopia on Sunday January 19, 2020 @10:20AM
(#22091851)
Template Haskell not working on ghcide has sadly been holding me back with it. I've heard great things about it otherwise
Re:Dynamic type systems are not inherently more open
by jose_zap on Sunday January 19, 2020 @02:39PM
(#22093474)
You can use HIE. It supports template Haskell
Re:Dynamic type systems are not inherently more open
by pwm on Sunday January 19, 2020 @02:31PM
(#22093415)
Recent ghcide can do it now as well as https://github.com/mpickering/apply-refact for hlint