scrooloose/syntastic — pull request #888 by tarruda (2013-12-01 04:48:17+00:00)
Title: Add support for .hsc files when using ghc-mod

Haskell's ghc-mod does not support checking .hsc files directly and recommends
preprocessing with hsc2hs before doing so. This commit implements some changes
into the ghc_mod checker to work around that limitation:

When the checker is invoked, hsc2hs will be used(if available) automatically to
preprocess the .hsc file into temporary .hs file which is used by ghc-mod.

Since extra include directories may be needed to preprocess the file, a global
variable - g:syntastic_haskell_ghcmod_hsc2hs_flags - can be used to specify
those flags which are passed to hsc2hs.

If g:syntastic_haskell_ghcmod_hsc2hs_flags is not set, the checker will do minor
parsing of .cabal and .buildinfo files to try extracting those flags from
'include-dirs' options.