2017-07-24 04:36:28 +00:00
|
|
|
" Author: rob-b, Takano Akio <tak@anoak.io>
|
2017-02-14 22:47:53 +00:00
|
|
|
" Description: hdevtools for Haskell files
|
|
|
|
|
2017-07-24 04:36:28 +00:00
|
|
|
call ale#Set('haskell_hdevtools_executable', 'hdevtools')
|
|
|
|
call ale#Set('haskell_hdevtools_options', '-g -Wall')
|
|
|
|
|
|
|
|
function! ale_linters#haskell#hdevtools#GetExecutable(buffer) abort
|
|
|
|
return ale#Var(a:buffer, 'haskell_hdevtools_executable')
|
|
|
|
endfunction
|
|
|
|
|
|
|
|
function! ale_linters#haskell#hdevtools#GetCommand(buffer) abort
|
|
|
|
return ale#Escape(ale_linters#haskell#hdevtools#GetExecutable(a:buffer))
|
|
|
|
\ . ' check ' . ale#Var(a:buffer, 'haskell_hdevtools_options')
|
|
|
|
\ . ' -p %s %t'
|
|
|
|
endfunction
|
|
|
|
|
2017-02-14 22:47:53 +00:00
|
|
|
call ale#linter#Define('haskell', {
|
|
|
|
\ 'name': 'hdevtools',
|
2017-07-24 04:36:28 +00:00
|
|
|
\ 'executable_callback': 'ale_linters#haskell#hdevtools#GetExecutable',
|
|
|
|
\ 'command_callback': 'ale_linters#haskell#hdevtools#GetCommand',
|
2017-04-24 21:27:18 +00:00
|
|
|
\ 'callback': 'ale#handlers#haskell#HandleGHCFormat',
|
2017-02-14 22:47:53 +00:00
|
|
|
\})
|