Open meditans opened 9 years ago
Moreover, I don't seem to be able to obtain a refinement even in ghc-mod
command line or in ghc-modi
I traced back the issue to the ghc-mod warning:
Could not find a component assignment, falling back to guessed GHC options.
This warning is issued in the code in Target.hs
.
@DanielG, could you explain me what it means and why is it generated?
I understand it to be generated if the file being processed is not listed in any of the cabal targets, each of which has a GHC configuration associated with it.
ok, thanks to @alanz, I understood that the problem was that ghc-mod
should be executed in the folder containing the cabal
file. So, the problem is now that when I try to use the refine
command, I get no output.
I understand that the problem is generated in FillSig.hs
, in the refine
function:
where
handler (SomeException _) = emptyResult =<< options
@DanielG, how can I debug this to understand better where the error is coming from?
Edit: If I modify the line in
where
handler (SomeException exception) = (\opt -> traceShow exception (emptyResult opt)) =<< options
the exception returned for the example contained in ghc-mod --help
in the refine
case, returns:
Not in scope: ‘filter’
And I made sure that I imported Data.List
into my module.
It seems that ghc-mod isn't able to locate the filter
function I'm talking about.
maybe @serras too.
@meditans ping me when you have time to look at this more closely
@DanielG, I may have a couple hours to throw in later this afternoon (GMT+1), and I'll gladly look at this issue. I'll ping you in a few hours, ok?
That wont do, GMT+9 here by then I'll be asleep.
Ah, you are already there. Good then, let's do tomorrow in the interval between 11.15 am and 14.00 (GMT+1)? Otherwise propose another time and I'll try to be there! :)
I'll already be out of the office by then: It would have to be somewhere between 2:00 and 11:00 for you :/
Ok then, I'll try to connect at about 7:00 here. I'll ping you here on github shortly thereafter.
Ok, I'm ready to do some work. What are we going to do? Edit: I'm also on the irc channel.
I'm using ghc-mod from this repo with ghc-7.10. I am not able to refine with
C-cC-f
as in this example at http://www.mew.org/~kazu/proj/ghc-mod/en/emacs.htmlWhen I try to refine, I get a message saying "Cannot refine"