Open lemoce opened 7 years ago
You're venturing into some dark corners here, try this:
printf 'ascii-escape lint -h\x02--ignore=Use list comprehension\x03 Setup.hs\n\n' | ghc-mod legacy-interactive
Those two escaped ASCII control sequences are "\STX"
and "\ETX"
(in Haskell string syntax) respectively. Those two characters basically behave like quotes here but they don't nest. I don't recall why exactly we went for that instead of implementing normal shell escaping rules IIRC just because it was simpler.
This only appeared in v5.5.0.0 before that we didn't have a mechanism for spaces in legacy-interactive.
Thanks for reply, @DanielG .
I am using with Emacs. There is a elisp source code ghc-check.el, which implements the function
(defun ghc-check-send ()
(let ((file (buffer-file-name)))
(if ghc-check-command
(let ((opts (ghc-haskell-list-of-string ghc-hlint-options)))
(if opts
(format "lint %s %s\n" opts file)
(format "lint %s\n" file)))
(format "check %s\n" file))))
I think this function formats command for ghc-mod interactive. Is it correct?
It is entirely possible that we didn't get around to patching that into the elisp bits yet. Those changes were for Atom (ide-haskell) really. So if you want that in Emacs it should be reasonably easy to fix since you already found the right function and all. Patches welcome and what have you :)
I will try make a patch. I was checking the ground to see where I am stepping. =)
0001-Correction-on-formatted-string-for-Emacs-ghc-lint.patch.txt
I dont know if the correct way. I tried to make a pull request, but I am not allawed.
That's strange. Did you fork the repo or try to push to this one?
yeap, but I am not familiar with git.
Maybe you can quickly read through this Pull Request Tutorial?
Thanks @DanielG
Hello guys,
I am facing strange problem on ghc-mod. When I ran this command with no error:
But, I need to run in legacy-interactive, so:
And, I tried:
And, I also tried from ghc-modi
ghc-mod version
hlint version
Is there some configuration to make?