haskell_ghc_options are now added to the ghc command

This commit is contained in:
Kevin Tindall 2018-01-01 22:21:21 -06:00
parent c165c7c5d1
commit d8f71c46da
No known key found for this signature in database
GPG Key ID: 311063395E17044C
2 changed files with 19 additions and 1 deletions

View File

@ -1,10 +1,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': 'ghc -fno-code -v0 %t',
\ 'command_callback': 'ale_linters#haskell#ghc#GetCommand',
\ 'callback': 'ale#handlers#haskell#HandleGHCFormat',
\})

View File

@ -12,6 +12,16 @@ g:ale_haskell_brittany_executable *g:ale_haskell_brittany_executable*
This variable can be changed to use a different executable for brittany.
===============================================================================
ghc *ale-haskell-ghc*
g:ale_haskell_ghc_options *g:ale_haskell_ghc_options*
*b:ale_haskell_ghc_options*
Type: |String|
Default: `'-fno-code -v0'`
This variable can be changed to modify flags given to ghc.
===============================================================================
hdevtools *ale-haskell-hdevtools*