X-Git-Url: https://git.madduck.net/etc/vim.git/blobdiff_plain/0ee596c5c5e11fc79598407eaf22f83d279f7e9e..5a4872f466ebd76ddd532bdf2798554421c53df4:/.vim/bundle/ale/ale_linters/haskell/stack_build.vim diff --git a/.vim/bundle/ale/ale_linters/haskell/stack_build.vim b/.vim/bundle/ale/ale_linters/haskell/stack_build.vim new file mode 100644 index 00000000..8f2d9fd9 --- /dev/null +++ b/.vim/bundle/ale/ale_linters/haskell/stack_build.vim @@ -0,0 +1,23 @@ +" Author: Jake Zimmerman +" Description: Like stack-ghc, but for entire projects +" +" Note: Ideally, this would *only* typecheck. Right now, it also does codegen. +" See . + +call ale#Set('haskell_stack_build_options', '--fast') + +function! ale_linters#haskell#stack_build#GetCommand(buffer) abort + let l:flags = ale#Var(a:buffer, 'haskell_stack_build_options') + + return 'stack build ' . l:flags +endfunction + +call ale#linter#Define('haskell', { +\ 'name': 'stack_build', +\ 'aliases': ['stack-build'], +\ 'output_stream': 'stderr', +\ 'executable': function('ale#handlers#haskell#GetStackExecutable'), +\ 'command': function('ale_linters#haskell#stack_build#GetCommand'), +\ 'lint_file': 1, +\ 'callback': 'ale#handlers#haskell#HandleGHCFormat', +\})