
At Fri, 08 Feb 2013 12:50:47 +0100, CJ van den Berg wrote:
On 08/02/13 12:25, Francesco Mazzoli wrote:
At Fri, 08 Feb 2013 11:39:19 +0100, CJ van den Berg wrote:
I downloaded your package and tried it. It does work.
So, what I have is
bitonic@clay ~/src/kant (git)-[master] % cat .ghci :set -isrc
And I still get the mentioned error. Did you take any other measures to make things work? I’m using ghc-mod version 1.11.3.
Ah, I only just realised that you’re talking about the flymake error, not the inferior-mode error. The problem is pretty much the same though. flymake uses ghc --make, which can’t import the Kant module because it doesn’t know how to build Parser.y.
No, that is not the problem, I have a manually preprocessed Parser.hs in place.
ghc-ghc-options is the right place for flymake options to ghc.
Tried setting ‘ghc-ghc-options’, still no luck. And by the way, running ‘ghc-mod’ manually doesn’t help either: bitonic@clay ~/src/kant (git)-[master] % cat .ghci :set -isrc bitonic@clay ~/src/kant (git)-[master] % ghc-mod check src/Kant/REPL.hs src/Kant/REPL.hs:0:0:Error:<command line>: cannot satisfy -package kant (use -v for more information)
Options in .ghci won’t fix flymake, only inferior-mode. ghc-ghc-options is the place to fix flymake, although it won’t help if the import fails anyway.
Can’t you manually preprocess Parser.y so that ghc --make has a .hs file it can use?
Well yes I can, but it’s a bit annoying. I think things would be easier if ‘ghc-mod’ just used cabal commands (e.g. ‘cabal build’) to check things. Francesco