]> git.madduck.net Git - etc/vim.git/blob - .vim/bundle/ale/ale_linters/haskell/stack_build.vim

madduck's git repository

Every one of the projects in this repository is available at the canonical URL git://git.madduck.net/madduck/pub/<projectpath> — see each project's metadata for the exact URL.

All patches and comments are welcome. Please squash your changes to logical commits before using git-format-patch and git-send-email to patches@git.madduck.net. If you'd read over the Git project's submission guidelines and adhered to them, I'd be especially grateful.

SSH access, as well as push access can be individually arranged.

If you use my repositories frequently, consider adding the following snippet to ~/.gitconfig and using the third clone URL listed for each project:

[url "git://git.madduck.net/madduck/"]
  insteadOf = madduck:

Merge commit '76265755a1add77121c8f9dabb3e9bb70fe9a972' as '.vim/bundle/ale'
[etc/vim.git] / .vim / bundle / ale / ale_linters / haskell / stack_build.vim
1 " Author: Jake Zimmerman <jake@zimmerman.io>
2 " Description: Like stack-ghc, but for entire projects
3 "
4 " Note: Ideally, this would *only* typecheck. Right now, it also does codegen.
5 " See <https://github.com/commercialhaskell/stack/issues/977>.
6
7 call ale#Set('haskell_stack_build_options', '--fast')
8
9 function! ale_linters#haskell#stack_build#GetCommand(buffer) abort
10     let l:flags = ale#Var(a:buffer, 'haskell_stack_build_options')
11
12     return 'stack build ' . l:flags
13 endfunction
14
15 call ale#linter#Define('haskell', {
16 \   'name': 'stack_build',
17 \   'aliases': ['stack-build'],
18 \   'output_stream': 'stderr',
19 \   'executable': function('ale#handlers#haskell#GetStackExecutable'),
20 \   'command': function('ale_linters#haskell#stack_build#GetCommand'),
21 \   'lint_file': 1,
22 \   'callback': 'ale#handlers#haskell#HandleGHCFormat',
23 \})