You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Set the resolver in ~/.stack/global-project/stack.yaml
In a work directory:
Run: stack get cabal
Add a stack.yaml file to the pull sources
Run: stack install. The cabal executable should be installed in ~/.local/bin.
Grab the cabal.config for the resolver: curl https://www.stackage.org/lts-8.24/cabal.config
Use the build-everything-cabal script below to generate a everything.cabal file with all the packages listed in the build-depends: field. Place the cabal file in ~/.stack/global-project. Now you can use stack install <package> outside a project directory and get packages installed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Syntastic plugins have attributes of being available and enabled.
Use the :SyntasticInfo command to determine which plugins were detected as available
and then which one was selected as enabled.
Use the variable g:syntastic_haskell_checkers to select which one you want to use, e.g.:
let g:syntastic_haskell_checkers = ['ghc_mod']
Syntastic plugin ghc_mod
This plugin does not work. The _IsAvailable function
tries to validate the version of ghc-mod, but I doubt that check
is necessary anymore. Also, the GetLocLines function adds
a --boundary option which is not recognized by recent versions of ghc-mod.
If you remove the _IsAvailable function and fix GetLocLines so that
the command line used is:
This plugin will work if you have a working ghc-mod command.
neco-ghc
neco-ghc provides autocompletion of module, type and function names
via vim's omnicompletion feature. This plugin requires a working ghc-mod
command.
Use C-X C-O to bring up a list of possible completions at the current
cursor position.
Enable neco-ghc in Haskell mode with:
let g:haskellmode_completion_ghc = 1
autocmd FileType haskell setlocal omnifunc=necoghc#omnifunc
in your .vimrc file.
Setting up the ghc-mod command
All of these plugins (except for the hlint checker) require a
working ghc-mod command.
I am using stack exec ghc-mod as my ghc-mod command by setting up
a wrapper script in my personal ~/bin directory which looks like:
#!/bin/sh
stack exec ghc-mod -- "$@"
If executed outside a stack project directory, stack will look in the
"global" project directory ~/.stack/global-project for the stack.yaml
and .cabal files.