Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error overlays #770

Merged
merged 10 commits into from Jul 26, 2015
Merged

Error overlays #770

merged 10 commits into from Jul 26, 2015

Conversation

deepfire
Copy link
Contributor

No description provided.

@deepfire
Copy link
Contributor Author

Origin PR: #766

(error (list 'haskell-error-face haskell-check-error-fringe)))
(overlay-put ovl 'before-string fringe)
(overlay-put ovl 'face face))))))

(defun haskell-process-errors-warnings (module-buffer session process buffer &optional return-only)
"Trigger handling type errors or warnings. Either prints the
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you please add second whitespace after . (emacs lint produces a warnings about this)?

@geraldus
Copy link
Contributor

very nice!

@deepfire
Copy link
Contributor Author

@geraldus, pushed, but, if I'm not wrong the lack of a double-space in that docstring wasn't introduced by me.

@deepfire deepfire closed this Jul 22, 2015
@deepfire deepfire reopened this Jul 22, 2015
@gracjan
Copy link
Contributor

gracjan commented Jul 23, 2015

@deepfire: Good stuff. There are some things to get in shape, overall this is pretty cool thing!

@deepfire deepfire force-pushed the error-overlays branch 5 times, most recently from 6106eba to ae81a0c Compare July 23, 2015 22:33
@deepfire
Copy link
Contributor Author

@gracjan, I'm thinking.. is it time to separate overlay functions into haskell-overlay.el ?

@deepfire deepfire force-pushed the error-overlays branch 2 times, most recently from 945f9b0 to 81c1af4 Compare July 23, 2015 22:54
@deepfire
Copy link
Contributor Author

@gracjan, after a litany of curses I have made ghc-mod to work again -- without error-overlays, that is.
I didn't manage to get it working properly, which is a perennial issue -- and indeed, one of my chief motivators to jump ship -- all I got to work was a misplaced error overlay at the top of the file -- as in, it is misplaced, but it correlates with what GHC returns for the file.

And I can happily report that:

  1. error-overlays, with haskell-process-load-file does not seem to make this user experience any worse
  2. M-n/M-p doesn't seem to conflict with any ghc-mod's bindings -- and a glance at their source suggests that this is how it should be, indeed
  3. the overlays from both packages coexist, which raises a certain question..

I'm not sure if this constitutes sufficient testing, though.

@gracjan
Copy link
Contributor

gracjan commented Jul 26, 2015 via email

gracjan added a commit that referenced this pull request Jul 26, 2015
Error overlays in haskell-interactive-mode
@gracjan gracjan merged commit 281883d into haskell:master Jul 26, 2015
@deepfire deepfire deleted the error-overlays branch July 26, 2015 15:09
@geraldus
Copy link
Contributor

Cool, thanks! Let's try this out!

@deepfire
Copy link
Contributor Author

@geraldus, it's somewhat incomplete without the other pull requests, I'm afraid..

@deepfire
Copy link
Contributor Author

@geraldus, at a minimum you would want:

(pushnew "-Wall" haskell-process-args-ghci)

@@ -49,6 +49,8 @@
(define-key map (kbd "C-c C-x") 'haskell-process-cabal)
(define-key map [?\C-c ?\C-b] 'haskell-interactive-switch)
(define-key map [?\C-c ?\C-z] 'haskell-interactive-switch)
(define-key map (kbd "M-n") 'haskell-goto-next-error)
(define-key map (kbd "M-p") 'haskell-goto-prev-error)
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Aren't these going to conflict with ghc-mod?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@DanielG, do you mean with:

(defvar ghc-previous-key    "\ep")
(defvar ghc-next-key        "\en")

I must say I overlooked this, then..

But then, there's the more pressing question of having two sets of overlays on at the same time, which is still unresolved.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants