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

Ivan Lazar Miljenovic ivan.miljenovic at gmail.com
Sun Sep 6 22:01:01 UTC 2015


On 7 September 2015 at 06:58, Stuart Popejoy <spopejoy at panix.com> wrote:
> 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.

haskell-session-change-target

>
> 2. flycheck has the opposite problem: it fails on library module imports but
> recognizes imports local to the section.

Yeah, it claims to have sandbox support but for some reason I've never
managed to get it to stop complaining about not being able to find
modules installed in the sandbox.

>
> 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
> _______________________________________________
> Haskell-Cafe mailing list
> Haskell-Cafe at haskell.org
> http://mail.haskell.org/cgi-bin/mailman/listinfo/haskell-cafe



-- 
Ivan Lazar Miljenovic
Ivan.Miljenovic at gmail.com
http://IvanMiljenovic.wordpress.com


More information about the Haskell-Cafe mailing list