diff options
author | Vo Anh Duy <voanhduy1512@live.com> | 2017-08-13 00:50:27 +0800 |
---|---|---|
committer | Vo Anh Duy <voanhduy1512@live.com> | 2017-08-13 20:49:26 +0800 |
commit | 626568d66d6c57a87cbbed830986e3087d1afca0 (patch) | |
tree | 5878664b65f9300a573b2d335ac52ed8859c14f9 /ale_linters/haskell | |
parent | e6b614673144ed5d39a7a8d989b3904a45af1199 (diff) | |
download | ale-626568d66d6c57a87cbbed830986e3087d1afca0.zip |
Make ghc-mod be awared of cabal file
Right now ghc-mod linter check temp file instead of current buffer,
which cause the problem that it can't detect cabal file and raise
missing package error.
To fix that we need to run ghc-mod check with actual path of the current
file and with ghc-mod option `--map-file` to redirect temp file source
code to actual one
Diffstat (limited to 'ale_linters/haskell')
-rw-r--r-- | ale_linters/haskell/ghc-mod.vim | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/ale_linters/haskell/ghc-mod.vim b/ale_linters/haskell/ghc-mod.vim index d3d23649..35f94c33 100644 --- a/ale_linters/haskell/ghc-mod.vim +++ b/ale_linters/haskell/ghc-mod.vim @@ -4,13 +4,13 @@ call ale#linter#Define('haskell', { \ 'name': 'ghc-mod', \ 'executable': 'ghc-mod', -\ 'command': 'ghc-mod check %t', +\ 'command': 'ghc-mod --map-file %s=%t check %s', \ 'callback': 'ale#handlers#haskell#HandleGHCFormat', \}) call ale#linter#Define('haskell', { \ 'name': 'stack-ghc-mod', \ 'executable': 'stack', -\ 'command': 'stack exec ghc-mod check %t', +\ 'command': 'stack exec ghc-mod --map-file %s=%t check %s', \ 'callback': 'ale#handlers#haskell#HandleGHCFormat', \}) |