A program that carelessly outputs null characters in a Unix environment is just begging for trouble.
No, for all I see Vim cannot handle null characters when parsing output with 'errorformat'
. (It is possible to add NULs to the errorformat string by prefixing them with CTRL-V
, i.e. ^V^@
, but this is useless.)
The work-around for output that isn't suited for Vim's errorformat is to add a filter to the 'makeprg'
program and then use :make
to populate the quickfix list:
:set makeprg=ghc-mod\ lint\ %\ \\\|\ tr\ -d\ '\\0'
:make
This hint can be found at the very end of :h error-file-format
.
A much better solution is to simply not bother and use the popular ghcmod plugin that does this and much more.