Magnus Therning | 5 Jan 15:36 2014

Turning off warning in ghc-mod (in vim)

On the command line I can do the following:

  % ghc-mod check -g -isrc -g dist/build/autogen src/Main.hs | grep Top-level
  Binary file (standard input) matches
  % ghc-mod check -g -isrc -g dist/build/autogen -g -fno-warn-missing-signatures src/Main.hs | grep Top-level
  %

That is, there is no output on the second call, just as expected.
However, I can't work out out to turn off the warning in Vim.  AFAIU
the following should work:

  g:ghcmod_ghc_options = ['-isrc', '-idist/build/autogen', '-fno-warn-missing-signatures']

but it doesn't.  I'm obviously missing something, but what?

/M

--

-- 
Magnus Therning                      OpenPGP: 0xAB4DFBA4 
email: magnus <at> therning.org   jabber: magnus <at> therning.org
twitter: magthe               http://therning.org/magnus

Beauty is more important in computing than anywhere else in technology
because software is so complicated. Beauty is the ultimate defence
against complexity.
     -- David Gelernter
_______________________________________________
Haskell-Cafe mailing list
(Continue reading)

Magnus Therning | 6 Jan 09:15 2014

Re: Turning off warning in ghc-mod (in vim)

On Sun, Jan 05, 2014 at 03:36:22PM +0100, Magnus Therning wrote:
> On the command line I can do the following:
> 
>   % ghc-mod check -g -isrc -g dist/build/autogen src/Main.hs | grep Top-level
>   Binary file (standard input) matches
>   % ghc-mod check -g -isrc -g dist/build/autogen -g -fno-warn-missing-signatures src/Main.hs | grep Top-level
>   %
> 
> That is, there is no output on the second call, just as expected.
> However, I can't work out out to turn off the warning in Vim.  AFAIU
> the following should work:
> 
>   g:ghcmod_ghc_options = ['-isrc', '-idist/build/autogen', '-fno-warn-missing-signatures']
> 
> but it doesn't.  I'm obviously missing something, but what?

This was due to my confusion.  Once I realised that the markings in
Vim wasn't due to the ghc-mod.vim, but due to syntastic it became a
lot easier to fix my configuration.

In short

   g:ghcmod_ghc_options = ['-isrc', '-idist/build/autogen', '-fno-warn-missing-signatures']

works fine for controlling the GhcMod* commands.  To configure the
arguments syntastic pass to ghc-mod use this:

    g:syntastic_haskell_ghc_mod_args = '-g -fno-warn-missing-signatures'

/M
(Continue reading)


Gmane