emacs problem : haskell mode keeps hanging to report types, renders emacs useless

I have just reinstalled everything. Newest release of emacs, Haskell-pakage and Haskell-mode and Haskell. I have tried to do this as cleanly as possible (via the customise and package install interfaces). Now when I try to edit haskell files, the system keeps freezing to report types. Nothing that I try (setting configuration variables, etc.) has any effect. I know that there is a problem with parsing the command line with the newest version of GHCi, but I think I can avoid that by using :load instead of C-c C-l. This freezing problem, however, is another level of problem. It renders my emacs basically useless for editing haskell. Anybody recognise the problem, and have a fix? Thanks, Sean Matthews -- Sean Matthews seanmatthews1@gmail.com / +49 1515 800 1901

2017-11-04 22:39 GMT+01:00 Sean Matthews
I have just reinstalled everything. Newest release of emacs, Haskell-pakage and Haskell-mode and Haskell. I have tried to do this as cleanly as possible (via the customise and package install interfaces). Now when I try to edit haskell files, the system keeps freezing to report types. [...]
I don't have a concrete solution for your problem, but instead of fighting with Emacs packages and customizations directly, I would *highly* recommend Spacemacs (http://spacemacs.org/).After using and customizing Emacs for several decades, I switched to Spacemacs some months ago and never looked back. Getting a coherent set of packages for a task, and getting those packages to actually work together requires a non-trivial amount of configuration fiddling. This is what Spacemacs does for you, plus an easy way to update. Having said that, Spacemacs' Haskell layer works perfectly for me, perhaps you can give it a try. Another hint: Use stack/stackage instead of fiddling around with GHC installations, Cabal, sandboxes etc. for yourself. Cheers, S.

On Sat, Nov 4, 2017 at 3:00 PM, Sven Panne
2017-11-04 22:39 GMT+01:00 Sean Matthews
: I have just reinstalled everything. Newest release of emacs, Haskell-pakage and Haskell-mode and Haskell. I have tried to do this as cleanly as possible (via the customise and package install interfaces). Now when I try to edit haskell files, the system keeps freezing to report types. [...]
I don't have a concrete solution for your problem, but instead of fighting with Emacs packages and customizations directly, I would *highly* recommend Spacemacs (http://spacemacs.org/).After using and customizing Emacs for several decades, I switched to Spacemacs some months ago and never looked back. Getting a coherent set of packages for a task, and getting those packages to actually work together requires a non-trivial amount of configuration fiddling. This is what Spacemacs does for you, plus an easy way to update.
+1 for Spacemacs! Have enjoyed using its default layers after years of managing crusty dotfiles. Beware of ghc 8.2 and haskell mode ( https://github.com/haskell/haskell-mode/issues/1553) Mark
Having said that, Spacemacs' Haskell layer works perfectly for me, perhaps you can give it a try. Another hint: Use stack/stackage instead of fiddling around with GHC installations, Cabal, sandboxes etc. for yourself.
Cheers, S.
_______________________________________________ Haskell-Cafe mailing list To (un)subscribe, modify options or view archives go to: http://mail.haskell.org/cgi-bin/mailman/listinfo/haskell-cafe Only members subscribed via the mailman list are allowed to post.

Now when I try to edit haskell files, the system keeps freezing to report types. I don't think spacemacs is going to solve your problem. I'm using it, and it freezes/crashes at least 5 times a day for me. What exactly do you mean by "system keeps freezing to report types"? Does emacs become non-responsive or your entire system? For how long? After which keystroke - c-c c-t or c-c c-i? How big is your Haskell project? -- Saurabh.

Good questions. Should have said more in my original email.
1. Exact behavior is that Emacs freezes for about a minute and displays (in
bold) in the type of the word I'm over.
Thus, I was trying to edit a small a-list with dummy 0.000s in the
range. Every third keystroke, emacs stopped to tell me that
my cursor was over 0.000::Double and I have to wait an indeterminate
time (at least tens of seconds, sometimes a minute or more)
to get control back.
2. This is in Windows (8)
3. No the rest of the system does not freeze, thus allowing me to bring up
the process monitor and kill emacs.
4. I can't identify a combination of keys that does this. It seems to be
entirely random when I am moving the cursor around.
5. Turning off doc mode (etc.), which I first guessed might be the problem,
does not help.
On Sun, Nov 5, 2017 at 3:52 AM, Saurabh Nanda
Now when I try to edit haskell files, the system keeps freezing to report types.
I don't think spacemacs is going to solve your problem. I'm using it, and it freezes/crashes at least 5 times a day for me.
What exactly do you mean by "system keeps freezing to report types"? Does emacs become non-responsive or your entire system? For how long? After which keystroke - c-c c-t or c-c c-i? How big is your Haskell project?
-- Saurabh.
-- Sean Matthews seanmatthews1@gmail.com / +49 1515 800 1901

1. Exact behavior is that Emacs freezes for about a minute and displays (in bold) in the type of the word I'm over. Thus, I was trying to edit a small a-list with dummy 0.000s in the range. Every third keystroke, emacs stopped to tell me that my cursor was over 0.000::Double and I have to wait an indeterminate time (at least tens of seconds, sometimes a minute or more) to get control back.
So, the underlying mechanism to determine type at current cursor position isn't very fast. In spacemacs+intero C-c C-t (or C-c C-i) takes anywhere between 1 to 10 sec for me. Something in your setup has made this lookup automatic. It's trying to determine the type as your browse around your source code. Do you have any idea what could have caused that? You could try one more thing. Try delivering a SIGUSR2 to the Emacs process when it's stuck. It will stop doing whatever is holding it up and drop you into some sort of a debugger. That can give you some clues about what is causing this behaviour in your setup. -- Saurabh.

Problem fixed. Not an interesting problem, either. Turns out that I had not
quite completely cleaned out my emacs before reinstallation.
Many thanks,
Sean
On Sun, Nov 5, 2017 at 10:46 AM, Saurabh Nanda
1. Exact behavior is that Emacs freezes for about a minute and displays (in bold) in the type of the word I'm over. Thus, I was trying to edit a small a-list with dummy 0.000s in the range. Every third keystroke, emacs stopped to tell me that my cursor was over 0.000::Double and I have to wait an indeterminate time (at least tens of seconds, sometimes a minute or more) to get control back.
So, the underlying mechanism to determine type at current cursor position isn't very fast. In spacemacs+intero C-c C-t (or C-c C-i) takes anywhere between 1 to 10 sec for me. Something in your setup has made this lookup automatic. It's trying to determine the type as your browse around your source code. Do you have any idea what could have caused that?
You could try one more thing. Try delivering a SIGUSR2 to the Emacs process when it's stuck. It will stop doing whatever is holding it up and drop you into some sort of a debugger. That can give you some clues about what is causing this behaviour in your setup.
-- Saurabh.
-- Sean Matthews seanmatthews1@gmail.com / +49 1515 800 1901

Alas I spoke too soon, and my problem is still there. So it is back to the
cafe, looking for suggestions. Here is my problem in more detail:
- I am running a windows system. (note Windows, not Unix, Linux, OS X, or
any other Unix-a-like).
- I have a clean emacs installation - only thing I have done is to install
haskell-mode using the install-package function.
- I start-up interactive haskell mode (C-c interactive-haskell-mode, C-c
C-l (and I get a parsing complaint, but we ignore that)).
[at this point I have a live haskell process that I can interact with]
- I load my file (not large) into haskell.
- Emacs starts persisting in telling me in the Echo region the type of the
term under the cursor - all the time - and locks down to do this.
- The type report uses unicode text to do this (note that if I ask for the
type with C-c C-t or C-c C-i, I also get the type, but using ascii
characters, so it does not appear to be the same functionality that is
being triggered - if I turn off haskell-doc then the problem continues).
Anybody any suggestions, recognise this problem, or even just an address
where I can submit a bug report?
I cannot be the only person trying to work with haskell mode on windows.
Thanks
Sean Matthews
On Sun, Nov 5, 2017 at 8:24 PM, Sean Matthews
Problem fixed. Not an interesting problem, either. Turns out that I had not quite completely cleaned out my emacs before reinstallation.
Many thanks,
Sean
On Sun, Nov 5, 2017 at 10:46 AM, Saurabh Nanda
wrote: 1. Exact behavior is that Emacs freezes for about a minute and displays (in bold) in the type of the word I'm over. Thus, I was trying to edit a small a-list with dummy 0.000s in the range. Every third keystroke, emacs stopped to tell me that my cursor was over 0.000::Double and I have to wait an indeterminate time (at least tens of seconds, sometimes a minute or more) to get control back.
So, the underlying mechanism to determine type at current cursor position isn't very fast. In spacemacs+intero C-c C-t (or C-c C-i) takes anywhere between 1 to 10 sec for me. Something in your setup has made this lookup automatic. It's trying to determine the type as your browse around your source code. Do you have any idea what could have caused that?
You could try one more thing. Try delivering a SIGUSR2 to the Emacs process when it's stuck. It will stop doing whatever is holding it up and drop you into some sort of a debugger. That can give you some clues about what is causing this behaviour in your setup.
-- Saurabh.
-- Sean Matthews seanmatthews1@gmail.com / +49 1515 800 1901 <+49%201515%208001901>
-- Sean Matthews seanmatthews1@gmail.com / +49 1515 800 1901

Hi Sean, Did you try another mode which was called «deprecated» once? (require 'haskell-process) (add-hook 'haskell-mode-hook 'inf-haskell-mode) I personally use only this mode as I very appreciate a Lisp-like bottom-up development. Best regards, David Sorokin
24 нояб. 2017 г., в 1:11, Sean Matthews
написал(а): Alas I spoke too soon, and my problem is still there. So it is back to the cafe, looking for suggestions. Here is my problem in more detail:
- I am running a windows system. (note Windows, not Unix, Linux, OS X, or any other Unix-a-like).
- I have a clean emacs installation - only thing I have done is to install haskell-mode using the install-package function.
- I start-up interactive haskell mode (C-c interactive-haskell-mode, C-c C-l (and I get a parsing complaint, but we ignore that)).
[at this point I have a live haskell process that I can interact with]
- I load my file (not large) into haskell.
- Emacs starts persisting in telling me in the Echo region the type of the term under the cursor - all the time - and locks down to do this.
- The type report uses unicode text to do this (note that if I ask for the type with C-c C-t or C-c C-i, I also get the type, but using ascii characters, so it does not appear to be the same functionality that is being triggered - if I turn off haskell-doc then the problem continues).
Anybody any suggestions, recognise this problem, or even just an address where I can submit a bug report? I cannot be the only person trying to work with haskell mode on windows.
Thanks
Sean Matthews
On Sun, Nov 5, 2017 at 8:24 PM, Sean Matthews
mailto:seanmatthews1@gmail.com> wrote: Problem fixed. Not an interesting problem, either. Turns out that I had not quite completely cleaned out my emacs before reinstallation. Many thanks,
Sean
On Sun, Nov 5, 2017 at 10:46 AM, Saurabh Nanda
mailto:saurabhnanda@gmail.com> wrote: 1. Exact behavior is that Emacs freezes for about a minute and displays (in bold) in the type of the word I'm over. Thus, I was trying to edit a small a-list with dummy 0.000s in the range. Every third keystroke, emacs stopped to tell me that my cursor was over 0.000::Double and I have to wait an indeterminate time (at least tens of seconds, sometimes a minute or more) to get control back.
So, the underlying mechanism to determine type at current cursor position isn't very fast. In spacemacs+intero C-c C-t (or C-c C-i) takes anywhere between 1 to 10 sec for me. Something in your setup has made this lookup automatic. It's trying to determine the type as your browse around your source code. Do you have any idea what could have caused that?
You could try one more thing. Try delivering a SIGUSR2 to the Emacs process when it's stuck. It will stop doing whatever is holding it up and drop you into some sort of a debugger. That can give you some clues about what is causing this behaviour in your setup.
-- Saurabh.
-- Sean Matthews seanmatthews1@gmail.com mailto:seanmatthews1@gmail.com / +49 1515 800 1901 tel:+49%201515%208001901
-- Sean Matthews seanmatthews1@gmail.com mailto:seanmatthews1@gmail.com / +49 1515 800 1901 _______________________________________________ Haskell-Cafe mailing list To (un)subscribe, modify options or view archives go to: http://mail.haskell.org/cgi-bin/mailman/listinfo/haskell-cafe http://mail.haskell.org/cgi-bin/mailman/listinfo/haskell-cafe Only members subscribed via the mailman list are allowed to post.
participants (5)
-
David Sorokin
-
Mark Fine
-
Saurabh Nanda
-
Sean Matthews
-
Sven Panne