summaryrefslogtreecommitdiff
path: root/ale_linters/haskell/ghc.vim
blob: daf91c8fd009f3884a42d4b7b1a11c35a3988127 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
" Author: w0rp <devw0rp@gmail.com>
" Description: ghc for Haskell files

call ale#Set('haskell_ghc_options', '-fno-code -v0')

function! ale_linters#haskell#ghc#GetCommand(buffer) abort
    return 'ghc '
    \   . ale#Var(a:buffer, 'haskell_ghc_options')
    \   . ' %t'
endfunction

call ale#linter#Define('haskell', {
\   'name': 'ghc',
\   'output_stream': 'stderr',
\   'executable': 'ghc',
\   'command_callback': 'ale_linters#haskell#ghc#GetCommand',
\   'callback': 'ale#handlers#haskell#HandleGHCFormat',
\})