Permalink
Browse files

use -fno-code in the cabal compiler

  • Loading branch information...
1 parent fc03044 commit 32a27cc806d0148d5bd66a36653c9ea135133140 @dag committed Sep 12, 2012
Showing with 17 additions and 7 deletions.
  1. +1 −1 compiler/cabal.vim
  2. +16 −6 doc/vim2hs.txt
View
@@ -11,5 +11,5 @@ let s:errorformat = join([
\ ], ',')
execute 'CompilerSet errorformat=' . escape(s:errorformat, ' ')
-CompilerSet makeprg=cabal\ build
+CompilerSet makeprg=cabal\ build\ --ghc-option=-fno-code
CompilerSet shellpipe&
View
@@ -54,12 +54,22 @@ or |ftplugin| to enable a compiler only for Haskell buffers, for example:
See also |g:hlint_args|.
*quickfix-cabal* *compiler-cabal*
-:compiler cabal Configure |:make| for using Cabal. Requires cabal
- (available as cabal-install from Hackage) to be
- installed and in $PATH. Runs "cabal build" which also
- works with cabal-dev, but you have to install
- dependencies and run configure first, for example by
- running "cabal-dev install".
+:compiler cabal Configure |:make| for type-checking using Cabal.
+ Requires cabal (available as cabal-install from
+ Hackage) to be installed and in $PATH. Runs "cabal
+ build" which also works with cabal-dev, but you have
+ to install dependencies and run configure first, for
+ example by running "cabal-dev install".
+
+ The option "-fno-code" is passed to GHC which means
+ the compilation phase is skipped and the code is only
+ type checked. This can be much faster, but also means
+ you can't use this to build your project from Vim.
+ Instead, it is recommended that you run "cabal
+ install" or similar from a terminal manually to
+ properly build and install a project that you already
+ know should type check. If you prefer, you can always
+ override |'makeprg'| yourself.
Warnings and errors from GHC will both parse as
unspecified type due to limitations of Vim's

0 comments on commit 32a27cc

Please sign in to comment.