You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
23 lines
754 B
VimL
23 lines
754 B
VimL
7 years ago
|
" Author: Jake Zimmerman <jake@zimmerman.io>
|
||
|
" Description: Like stack-ghc, but for entire projects
|
||
|
"
|
||
|
" Note: Ideally, this would *only* typecheck. Right now, it also does codegen.
|
||
|
" See <https://github.com/commercialhaskell/stack/issues/977>.
|
||
|
|
||
|
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',
|
||
|
\ 'output_stream': 'stderr',
|
||
|
\ 'executable': 'stack',
|
||
|
\ 'command_callback': 'ale_linters#haskell#stack_build#GetCommand',
|
||
|
\ 'lint_file': 1,
|
||
|
\ 'callback': 'ale#handlers#haskell#HandleGHCFormat',
|
||
|
\})
|