Skip to content

Debugger triggered on "match c of", a typo for "case c of" #599

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

Closed
mcandre opened this issue Apr 23, 2015 · 17 comments
Closed

Debugger triggered on "match c of", a typo for "case c of" #599

mcandre opened this issue Apr 23, 2015 · 17 comments

Comments

@mcandre
Copy link

mcandre commented Apr 23, 2015

As a Haskell newbie, I want haskell-mode to behave more gracefully when I make a typo, like match c of instead of case c of. Currently, the debugger triggers on such parse errors.

@ivan-m
Copy link
Contributor

ivan-m commented Apr 24, 2015

Is this for indentation? Or when you load it into ghci?

@mcandre
Copy link
Author

mcandre commented Apr 24, 2015

Indentation, no GHCi used.

@ivan-m
Copy link
Contributor

ivan-m commented Apr 24, 2015

Which indentation mode are you using? Can you provide the complete error for it?

@mcandre
Copy link
Author

mcandre commented Apr 24, 2015

Here is my .emacs configuration:

https://github.com/mcandre/dotfiles/blob/master/.emacs

@ivan-m
Copy link
Contributor

ivan-m commented Apr 24, 2015

Pinging @gracjan and @kuribas (especially since the new indentation mode was merged in recently).

@mcandre are you installing haskell-mode via package.el or a distro package? Do you know what version it is?

@mcandre
Copy link
Author

mcandre commented Apr 24, 2015

I load haskell-mode via use-package, install haskell-mode via Emacs Cask, source haskell-mode from MELPA, and I'm using the latest version, 20150423.710.

@ivan-m
Copy link
Contributor

ivan-m commented Apr 24, 2015

Yeah, so it is to do with the new version of haskell-indentation (and thus I can't really help you with it :p)

@mcandre
Copy link
Author

mcandre commented Apr 24, 2015

So haskell-mode maintains haskell-indentation, right? Could we fix the bug in haskell-indentation?

@gracjan
Copy link
Contributor

gracjan commented Apr 24, 2015

@mcandre: haskell-indentation uses usual elisp throw/catch mechanism to do deep unwinding. This is normal, what is not normal is that it should not trigger debugger, even if (debug-on-error t) is set.

Since you are the kind of person that has (debug-on-error t) you seem to have skill and knowledge to find out why catch/throw is triggering debugger. It should not.

Also note that MELPA comes in two variants, melpa and melpa-stable. The second one is supposed to be less bleeding edge than the first one. Instructions for both are in our https://github.com/haskell/haskell-mode/blob/master/README.md file.

@gracjan
Copy link
Contributor

gracjan commented Apr 24, 2015

@kuribas
Copy link
Contributor

kuribas commented Apr 24, 2015

hm, this is the same bug as in #483 I have a fix in my own haskell-indentation.el, but it is quite
out of sync with master. I should have a fix when I can get myself out the github mess...

@gracjan
Copy link
Contributor

gracjan commented Apr 24, 2015 via email

@kuribas
Copy link
Contributor

kuribas commented Apr 24, 2015

In my local repo, sorry... You can send mail to my resonata inbox.

@mcandre
Copy link
Author

mcandre commented Apr 25, 2015

@kuribas A fix you say? Please merge :)

I'm actually new to Emacs Lisp; The only reason I turned on debug-on-error is to produce better bug reports, lol!

@gracjan
Copy link
Contributor

gracjan commented Apr 25, 2015

Haha, well, we need to built some mechanism for bug reporting tailored for haskell-mode. debug-on-error sure isn't one of those :)

@gracjan
Copy link
Contributor

gracjan commented Sep 2, 2015

Thinking about this more I come to reason that haskell indentation should have a much more permissive parser. It should care only about of being a keyword, case can be treated as ordinary identifier, so it will not bail out when it see match. It won't care.

@gracjan
Copy link
Contributor

gracjan commented Jan 31, 2016

This is no longer bailing out with parse error.

@gracjan gracjan closed this as completed Jan 31, 2016
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

No branches or pull requests

4 participants