I'm on nixos and due to stack's integration with Nix/Nixos the following command is very slow:

time stack ghc
ghc: no input files
Usage: For basic information, try the `--help' option.
stack ghc  1.14s user 0.13s system 95% cpu 1.324 total

This means after a few keystrokes the emacs editor hangs... So I usually uninstall stack to remove it from the $PATH.

How can I disable this, to avoid this really frustrating delay?

In the messages:

haskell-stack-ghc: Flycheck checker haskell-stack-ghc returned non-zero exit code 1,

I have tried adding:

(add-to-list '(flycheck-disabled-checkers '(haskell-stack-ghc)))

to my init file, but there was no change in behavior.

2 Answers 2

(add-to-list 'flycheck-disabled-checkers 'haskell-stack-ghc)

The first argument to add-to-list is the name (more precisely the symbol) of the variable to modify. The second argument is the element (here again a symbol) to add. Both symbols need to be quoted since you need to pass the symbol itself to the function and not the value that the variable is bound to.

(setq-default flycheck-disabled-checkers '(haskell-stack-ghc))

I had to set the above...

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.