[Haskell-cafe] emacs haskell-mode with cabal exec, test suite sections

Stuart Popejoy spopejoy at panix.com
Sun Sep 6 20:58:52 UTC 2015


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.

Any thoughts or suggestions? Commiseration is OK too :)

Thanks,
Stuart


More information about the Haskell-Cafe mailing list