ghc-mod only shows first line in *GHC info* - haskell

I am using emacs (24.3.1) in haskell-mode together with ghc-mod to play with Haskell.
Now everything works fine aside from one annoying thing:
Every output in the GHC info buffer contains only the first line.
For example when I ask for ghc-show-info (let's say on sqlSettings from persist) I get this:
while Interactive-Haskell works fine:
This happens with everything: infos, errors, warnings, etc.
Right now I have no clue what is causing this issue as it seems that ghc-mod in emacs is parsing the output wrong.
Maybe someone can help me get all the info.
Thanks
PS: maybe this one shows the problem a bit better:
instead of

It might be this bug https://github.com/kazu-yamamoto/ghc-mod/issues/297
It has been fixed recently with ghc-mod >= 4.1.6

Related

Getting rid of 'netrw' plugin for vim

I have no idea how 'netrw' works, nor how it got enabled on my vim. I want to get rid of it, or the very least learn how to run a 'c' file one it.
I have tried adding
let loaded_netrwPlugin = 1
to my ~/.vimrc file.
I have tried returning my vim back to default, with great failure. I have tried just about everything on the internet to get rid of it so I can test my homework on the flip server. But the strange plugin is still there and I can't figure out how to work it.
I am used to just going vim <folder_name> then clang <my_project.c> then ./a.out to run it. What happened to those good old days?
Thank you for any help. I have tried so many things and nothing is really working out.
This is what I see when I vim my CS-261, I just want to be able to open assignment_1 and compile my assignments in there.
I don’t see where you would need vim for the actions you want to do. Just run
cd <folder_name>
clang <my_project.c>
./a.out

AutoPEP8, Anaconda, Sublime Text 3 Inconsistent Error Reporting

Please reference the attached screenshot.
I am working on a scrapy pipeline. I am using Sublime Text 3 with Anaconda/AutoPep8. I just moved over from ST2 where I did not have AutoPep8 or Anaconda.
The huge white dot is telling me that this line has invalid syntax. I could not figure out what the problem was, so I copied the line and pasted it here on line 1 of what was then an empty file. The syntax error still showed, suggesting it was not a problem with a prior line missing a closing parenthesis.
Then I made up some similar code, lines 3, 6, & 9. As you can see, they all pass muster. (I don't care about the other little errors, they are not the issue).
Then I pasted in the entire method over onto this new document, and now, as you can see, even the suspect line (22) passes.
Then I copied and pasted the whole class, and again, as you can see, line 49, the code it was complaining about before now doesn't cause any issues at all.
I tried using the command palette - PEP8: Preview Changes, (see https://github.com/wistful/SublimeAutoPEP8) but nothing happened.
I also tried the right click menu Anaconda > Autoformat PEP8 Errors but the E501 errors (line too long) were ignored and nothing happened with the supposed syntax error in the if statement.
Note: When I first started using AutoPep8 to fix E501 errors last week, I noticed that about halfway through a script, it suddenly stopped reporting errors at all. Don't know if this is related.
I also get this error when ST3 starts: https://github.com/DamnWidget/anaconda/issues/514. However, the consensus seems to be that if Sublime works even after you click through this error, it is nothing to worry about. I just mention this to give you as much as I know so you can help.
I also tried turning len('advocate') into a string, but the syntax error remains.
What is going on here? Is there a bug in Anaconda, AutoPep8, ST3, or my code?
Ubuntu 16.04, Python 3.4, (but 'automatic' build in ST3) ST3 Build 3126 (I don't know how the Build number lines up with a version number) Anaconda, AutoPep8 version numbers unknown, but I got them less than two weeks ago.
Well, it took a lot of very patient Googling and a comparison test in VSCode, but I have the astoundingly simple answer: I should have put '==', not '=' ! Yes, dear friends, it is basic Python. = means assignment, == mean equality or comparison. My if is of the latter type, because you can't make an assignment in an if statement. Now VSCode didn't make this any clearer, I think they both use Pylint, but it at least let me know that this was probably a valid error, whether I understood it or not. (Unless of course I know more that the devs at Pylint...Yea, not likely).
Kudos to Jean Mark Gawron, (who must be related to the Klingon Emperor) for giving me the answer: http://gawron.sdsu.edu/python_for_ss/course_core/book_draft/programming_intro/boolean_results.html

LaTeX document errors where no errors exist

I am writing my thesis with LaTeX and since today very curious errors turn up. I wrote something and made a citication in the file references.bib, and then the errors turned up. Befor writing that few lines everything worked great. Thus, I deleted everything I've added. But the errors still turn up. One Error is: Extra }, or forgotten $. ...ckoverflow Permission SYSTEM_ALERT_WINDOW}. I think my citication (which I've deleted after the errors turned up) is still stored somewhere , because "ckoverflow Permission SYSTEM_ALERT_WINDOW" was a part of the title of the cite.
I hadn't found any error in any file.
The next weird thing is that a mate of mine can compile that files without any problems. He is using WinEdt. I am using TeXStudio, but I've tried it with WinEdt, too.
There is a screenshot of my errors:
Please help me, any suggestions are appreciated.
Best regards
Looks like you might need to escape your _ characters there, as they are normally used for subscript, but only in math mode; hence the "missing $ inserted".
(La)TeX error messages make me sad... :(

vim-haskellmode and hsenv

I've been using hsenv (with great success!)
to deal with the usual cabal dependency issues.
Its terrific, but there is one glitch I can't get around: how to persuade the
(also excellent!) vim-haskellmode to use the environment variables set by hsenv -- namely the paths to GHC, cabal database and so on
when compiling, generating tags etc.
Does anyone know how to solve this problem?
Sorry, hit the wrong button -- I should be asking questions about how to use SO instead :)
Anyways, an even better trick is to put this into the .vimrc
let g:ghc=system("which ghc")
This way (assuming that g:ghc gets bound when you run vim) it will pick up whichever ghc
is being currently used (by hsenv).
Ranjit Jhala.
One, simple solution is to hack one's .vimrc so that
let g:ghc="/path/to/hsenv/ghc"

GHCI character limit?

I'm using ghci to do some incremental development using Emacs' run-haskell. Every once in a while, I get an error that looks like
<interactive>:[line]:[character]: _Lexical error at character '\EOT'
Setting up an intermediate variable or two gets a working response, and the file I'm working on both loads and compiles properly. Reducing character count also works; the max I seem to be able to hit is 252.
Anyone have an idea of what's going on?
This was filed and closed as a bug in GHC several years ago, so looks like no dice on fixing it at the GHCi end. (Searching "_Lexical error at character '\EOT'" gives a few other results (for example), but I can't work out how applicable they are.)

Resources