Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How/where to add global ghc flags #55

Open
timmytofu opened this issue Aug 5, 2014 · 0 comments
Open

How/where to add global ghc flags #55

timmytofu opened this issue Aug 5, 2014 · 0 comments

Comments

@timmytofu
Copy link

EDITED:

I have g:ghcmod_ghc_options set to "-fno-warn-unused-binds" but I'm still getting "Defined but not used" warnings.

Running :echo ghcmod#build_command(["check"]) the output I get is

['ghc-mod', '-g', '-i/home/username/path/dist/build/autogen', '-g', '-I/home/username/path/dist/build/autogen',
'-g', '-optP-include', '-g', '-optP/home/username/path/dist/build/autogen/cabal_macros.h', '-g', '-i/home/username/path/dist/build/criterion/criterion-tmp',
'-g', '-I/home/username/path/dist/build/criterion/criterion-tmp', '-g', '-i/home/username/path/dist/build/doctest/doctest-tmp',
'-g', '-I/home/username/path/dist/build/doctest/doctest-tmp', '-g', '-i/home/username/path/dist/build/hlint/hlint-tmp',
'-g', '-I/home/username/path/dist/build/hlint/hlint-tmp', '-g', '-i/home/username/path/dist/build/hspec/hspec-tmp',
'-g', '-I/home/username/path/dist/build/hspec/hspec-tmp', '-g', '-i/home/username/path/dist/build/route-test/route-test-tmp',
'-g', '-I/home/username/path/dist/build/route-test/route-test-tmp', '-g', '-i/home/username/path/dist/build/project/project-tmp',
'-g', '-I/home/username/path/dist/build/project/project-tmp', '-g', '-fno-warn-unused-binds', 'check']

so it's in there, and if I run that very command at the shell, those warnings are supressed. So, the only conclusion I can come up with is that ghcmod-vim does not actually call build_command, or calls it at a strange time such that that global variable is unset and it hangs on to the build command, or plays with it afterwards.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant