[Haskell-cafe] emacs haskell-mode with cabal exec, test suite sections
swiesner at lunaryorn.com
Tue Sep 8 17:26:10 UTC 2015
> Am 06.09.2015 um 22:58 schrieb Stuart Popejoy <spopejoy at panix.com>:
> I'm having trouble coding test-suite and executable sections with
> the emacs REPL and flycheck.
> 1. cabal-repl can compile against the library code, but fails to see any modules within the non-library section.
> 2. flycheck has the opposite problem: it fails on library module imports but recognizes imports local to the section.
> Note I don't always have these issues, but they seem to crop up whenever I upgrade GHC, or emacs, or haskell-mode, flycheck-haskell etc.
> I'm not sure #1 ever works, but #2 is happening to me on my mac, but not at work on Linux.
> For #1, in the past I've tried a big .dir-locals.el to use `ghci` for the repl and just import everything -- of course losing the nice cabal integration, plus it being slow as molasses to load source files.
> I also briefly investigated modifying haskell-mode to support separate sessions for a given section.
> For #2, flycheck is just a pain to debug, my only recourse is to stick debug output into `flycheck-start-command-checker` to see what commands are going out, and try to troubleshoot.
Do you know about `C-c ! C-c`/`M-x flycheck-compile`? This shows the command that Flycheck would use and the output it produces.
Can you show your Flycheck/Haskell setup for Emacs, and try to provide more specific details about the errors you see? At best, please include the output of the above command.
More information about the Haskell-Cafe