-
Notifications
You must be signed in to change notification settings - Fork 1
1. Setup
I use neovim with coc.nvim, and the ALE plugin for linting. Here is a nice article on setting up: Haskell + Vim.
The article is somewhat old, and Haskell now has a new LSP: haskell-language-server
. This unfortunately doesn't support HLint
as of now, so I use the ALE
plugin for that.
GHC is the standard compiler for Haskell.
Basic compiling example: ghc -o a.out -Wall <file.hs>
(notice the similarity to gcc
)
Here is the Haskell Platform installation. It's probably the easiest way to install Haskell.
HLint is the standard lint tool for Haskell.
Once installed, you can invoke it using hlint <file>.hs
The linter shows very useful warnings and possible rewrites to make the code cleaner and elegant.
GHCi is the interactive environment for GHC.
Once installed, you can fire up the interactive session using ghci
import Control.Arrow
main :: IO ()
main = interact $ ... -- interact takes a function of the type `String -> String`
I used to use VSCode with the Haskell plugin. It supports formatting and live analysis.
I switched to neovim + coc because VSCode was way too slow.