3 ms·
How good is the static analysis tooling (IDE / editor plugins) for Haskell? Given Haskell's powerful type system, I imagine that it must be possible to see wa
by latte 9y ago
How good is the static analysis tooling (IDE / editor plugins) for Haskell?
Given Haskell's powerful type system, I imagine that it must be possible to see warnings, hints, autocompletion and other early feedback about the code in the editor before compilation, like in Java, Kotlin etc. or even better - is that the case?
- preordained 9y agoMaybe things have changed, but not a couple years ago when I was working with Haskell. No IDE story at all, which is just a crying shame when you think about the kind of refactoring and powerful features you could support. The fact that vim or other text editors were typically what was used was just odd and a waste IMO...like having a rocket propulsion system strapped to a Huffy.
- tathougies 9y agoI use emacs + intern and it’s great. Type errors are underlined immediately, warnings and lint messages are marked. Half the time I let the compiler write the code by using ghc placeholders and playing type golf
- AlexCoventry 9y ago> Half the time I let the compiler write the code by using ghc placeholders and playing type golf Is this method documented anywhere? Sounds interesting.
- tathougies 9y agoJust put in an underscore where you want to write code. If you compile the code, GHC outputs an error with the expected type as well as all bindings in scope. Then, just work backwards. If you use intero, then all type errors are underlined, including placeholders. The general feature is called 'typed holes', and there's a wiki page here: https://wiki.haskell.org/GHC/Typed_holes https://wiki.haskell.org/GHC/Typed_holes
- AlexCoventry 9y agoThanks.