Re: [Haskell-cafe] Haskell-mode 2.4

2008-01-11 Thread Johan Tibell
  Emacs is completely frozen until I press C-g and then it goes back to
  normal (without loading the file). Here's the back trace:

  Debugger entered--Lisp error: (quit)
accept-process-output(#process haskell)
(and (not (re-search-forward comint-prompt-regexp nil t))
  (accept-process-output proc))

 So it seems to be waiting for the prompt but can't find it.
 If you look at the buffer containing the interactive process, is there
 a prompt there?  If not, can you try and figure out why not?
 If yes, can you try and figure out why it is not recognized by the
 comint-prompt-regexp?

I had the following in my .ghci to make GHCi's prompt less verbose:

:set prompt  

Removing that solves the problem.

Thanks!

-- Johan
___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe


Re: [Haskell-cafe] Haskell-mode 2.4

2008-01-11 Thread Stefan Monnier
 Johan == Johan Tibell [EMAIL PROTECTED] writes:

  Emacs is completely frozen until I press C-g and then it goes back to
  normal (without loading the file). Here's the back trace:
 
  Debugger entered--Lisp error: (quit)
accept-process-output(#process haskell)
(and (not (re-search-forward comint-prompt-regexp nil t))
  (accept-process-output proc))
 
 So it seems to be waiting for the prompt but can't find it.
 If you look at the buffer containing the interactive process, is there
 a prompt there?  If not, can you try and figure out why not?
 If yes, can you try and figure out why it is not recognized by the
 comint-prompt-regexp?

 I had the following in my .ghci to make GHCi's prompt less verbose:

 :set prompt  

 Removing that solves the problem.

You can also add the following to your .emacs:

  (add-hook 'inferior-haskell-mode-hook
(lambda ()
  (set (make-local-variable 'comint-prompt-regexp)
   ^ )))

Or some fancier regexp (the default is
^\\*?[A-Z][\\._a-zA-Z0-9]*\\( \\*?[A-Z][\\._a-zA-Z0-9]*\\)* ).


Stefan
___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe


Re: [Haskell-cafe] Haskell-mode 2.4

2008-01-10 Thread Johan Tibell
 First of all, thanks. My Aqua Emacs (on OS X Leopard) hangs when I
 send a command like C-c C-l or C-c C-t to the interpreter (I can quit
 the command using C-g) . Starting the interpreter and using :l from
 inside it works fine. This is using GHC 6.8 (and I think I also tried
 6.6.) What could be the problem?

 I also tried to eval this but it didn't make a difference:

 (setq inferior-haskell-find-project-root nil)

It looks like this is a problem with 6.8.2 as haskell-mode-2.3 has the
same problem? Seems like the commands being sent to the haskell
process never reaches it.
___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe


Re: [Haskell-cafe] Haskell-mode 2.4

2008-01-10 Thread Stefan Monnier
 First of all, thanks. My Aqua Emacs (on OS X Leopard) hangs when I
 send a command like C-c C-l or C-c C-t to the interpreter (I can quit
 the command using C-g) . Starting the interpreter and using :l from
 inside it works fine. This is using GHC 6.8 (and I think I also tried
 6.6.) What could be the problem?
 
 I also tried to eval this but it didn't make a difference:
 
 (setq inferior-haskell-find-project-root nil)

 It looks like this is a problem with 6.8.2 as haskell-mode-2.3 has the
 same problem? Seems like the commands being sent to the haskell
 process never reaches it.

Try can you try to look into the nature of the hang?
Is Emacs completely frozen?  Does C-g get you back to something usable?
If so, can you set Options = Enter Debugger on Quit, then reproduce the
problem than hit C-g and show me the backtrace?
If not, can you run Emacs under a debugger and give me a backtrace of
when Emacs is frozen?


Stefan
___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe


Re: [Haskell-cafe] Haskell-mode 2.4

2008-01-10 Thread Johan Tibell
On Jan 11, 2008 12:05 AM, Stefan Monnier [EMAIL PROTECTED] wrote:

  First of all, thanks. My Aqua Emacs (on OS X Leopard) hangs when I
  send a command like C-c C-l or C-c C-t to the interpreter (I can quit
  the command using C-g) . Starting the interpreter and using :l from
  inside it works fine. This is using GHC 6.8 (and I think I also tried
  6.6.) What could be the problem?
 
  I also tried to eval this but it didn't make a difference:
 
  (setq inferior-haskell-find-project-root nil)

  It looks like this is a problem with 6.8.2 as haskell-mode-2.3 has the
  same problem? Seems like the commands being sent to the haskell
  process never reaches it.

 Try can you try to look into the nature of the hang?
 Is Emacs completely frozen?  Does C-g get you back to something usable?
 If so, can you set Options = Enter Debugger on Quit, then reproduce the
 problem than hit C-g and show me the backtrace?
 If not, can you run Emacs under a debugger and give me a backtrace of
 when Emacs is frozen?

Emacs is completely frozen until I press C-g and then it goes back to
normal (without loading the file). Here's the back trace:

Debugger entered--Lisp error: (quit)
  accept-process-output(#process haskell)
  (and (not (re-search-forward comint-prompt-regexp nil t))
(accept-process-output proc))
  (progn (goto-char comint-last-input-end) (and (not ...)
(accept-process-output proc)))
  (while (progn (goto-char comint-last-input-end) (and ... ...)))
  (save-current-buffer (set-buffer (process-buffer proc)) (while
(progn ... ...)))
  (with-current-buffer (process-buffer proc) (while (progn ... ...)))
  inferior-haskell-wait-for-prompt(#process haskell)
  (save-current-buffer (set-buffer (process-buffer proc))
(inferior-haskell-wait-for-prompt proc) (goto-char (process-mark
proc)) (insert-before-markers str) (move-marker comint-last-input-end
(point)) (comint-send-string proc str))
  (with-current-buffer (process-buffer proc)
(inferior-haskell-wait-for-prompt proc) (goto-char (process-mark
proc)) (insert-before-markers str) (move-marker comint-last-input-end
(point)) (comint-send-string proc str))
  inferior-haskell-send-command(#process haskell :cd
/Users/tibell/src/hyena/)
  (if (equal default-directory root) nil (setq default-directory root)
(inferior-haskell-send-command proc (concat :cd 
default-directory)))
  (unless (equal default-directory root) (setq default-directory root)
(inferior-haskell-send-command proc (concat :cd 
default-directory)))
  (progn (unless (equal default-directory root) (setq
default-directory root) (inferior-haskell-send-command proc ...))
(setq file (file-relative-name file)))
  (if (and inferior-haskell-find-project-root (setq root ...)) (progn
(unless ... ... ...) (setq file ...)))
  (when (and inferior-haskell-find-project-root (setq root ...))
(unless (equal default-directory root) (setq default-directory root)
(inferior-haskell-send-command proc ...)) (setq file
(file-relative-name file)))
  (let ((parsing-end ...) root) (when (and
inferior-haskell-find-project-root ...) (unless ... ... ...) (setq
file ...)) (inferior-haskell-send-command proc (if reload :reload
...)) (if (boundp ...) (if ... ... ...)))
  (save-current-buffer (set-buffer (process-buffer proc))
(compilation-forget-errors) (let (... root) (when ... ... ...)
(inferior-haskell-send-command proc ...) (if ... ...))
(with-selected-window (display-buffer ...) (goto-char ...)) (when
inferior-haskell-wait-and-jump (inferior-haskell-wait-for-prompt proc)
(ignore-errors ...)))
  (with-current-buffer (process-buffer proc)
(compilation-forget-errors) (let (... root) (when ... ... ...)
(inferior-haskell-send-command proc ...) (if ... ...))
(with-selected-window (display-buffer ...) (goto-char ...)) (when
inferior-haskell-wait-and-jump (inferior-haskell-wait-for-prompt proc)
(ignore-errors ...)))
  (let ((buf ...) (file buffer-file-name) (proc ...))
(with-current-buffer (process-buffer proc) (compilation-forget-errors)
(let ... ... ... ...) (with-selected-window ... ...) (when
inferior-haskell-wait-and-jump ... ...)))
  inferior-haskell-load-file(nil)
  call-interactively(inferior-haskell-load-file)
___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe


Re: [Haskell-cafe] Haskell-mode 2.4

2008-01-10 Thread Stefan Monnier
  First of all, thanks. My Aqua Emacs (on OS X Leopard) hangs when I
  send a command like C-c C-l or C-c C-t to the interpreter (I can quit
  the command using C-g) . Starting the interpreter and using :l from
  inside it works fine. This is using GHC 6.8 (and I think I also tried
  6.6.) What could be the problem?
 
  I also tried to eval this but it didn't make a difference:
 
  (setq inferior-haskell-find-project-root nil)
 
  It looks like this is a problem with 6.8.2 as haskell-mode-2.3 has the
  same problem? Seems like the commands being sent to the haskell
  process never reaches it.
 
 Try can you try to look into the nature of the hang?
 Is Emacs completely frozen?  Does C-g get you back to something usable?
 If so, can you set Options = Enter Debugger on Quit, then reproduce the
 problem than hit C-g and show me the backtrace?
 If not, can you run Emacs under a debugger and give me a backtrace of
 when Emacs is frozen?

 Emacs is completely frozen until I press C-g and then it goes back to
 normal (without loading the file). Here's the back trace:

 Debugger entered--Lisp error: (quit)
   accept-process-output(#process haskell)
   (and (not (re-search-forward comint-prompt-regexp nil t))
 (accept-process-output proc))

So it seems to be waiting for the prompt but can't find it.
If you look at the buffer containing the interactive process, is there
a prompt there?  If not, can you try and figure out why not?
If yes, can you try and figure out why it is not recognized by the
comint-prompt-regexp?


Stefan
___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe


Re: [Haskell-cafe] Haskell-mode 2.4

2008-01-08 Thread Johan Tibell
On Dec 12, 2007 5:40 AM, Stefan Monnier [EMAIL PROTECTED] wrote:
 * inf-haskell.el tries to find the root of the module hierarchy to determine
   the root of a project (either by looking for a Cabal file or relying on
   the `module' declaration line).  If all works well, this will make C-c C-l
   automatically switch to the root dir, so that dependencies in other
   directories are automatically found.  If it doesn't, complain and/or set
   inferior-haskell-find-project-root to nil.

First of all, thanks. My Aqua Emacs (on OS X Leopard) hangs when I
send a command like C-c C-l or C-c C-t to the interpreter (I can quit
the command using C-g) . Starting the interpreter and using :l from
inside it works fine. This is using GHC 6.8 (and I think I also tried
6.6.) What could be the problem?

I also tried to eval this but it didn't make a difference:

(setq inferior-haskell-find-project-root nil)

-- Johan
___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe


[Haskell-cafe] Haskell-mode 2.4

2007-12-11 Thread Stefan Monnier
Here's for Xmas, version 2.4 of the Haskell-mode package.
Haskell-mode is an Elisp package to support editing Haskell in Emacs.
See the home page at

   http://www.iro.umontreal.ca/~monnier/elisp/


-- Stefan


Changes since 2.3:

* Update license to GPLv3.

* New derived major mode for .hsc files.

* Removed the C-c C-r binding to reload a file.  You can still call
  inferior-haskell-reload-file (and/or bind it to your favorite key,
  including C-c C-r) or you can now use C-u C-c C-l.

* C-c C-d looks up the symbol at point in the Haddock docs.

* Haddock comments are highlighted with font-lock-doc-face if it exists.

* Use `tex' rather than `latex' for haskell-literate.

* inf-haskell.el tries to find the root of the module hierarchy to determine
  the root of a project (either by looking for a Cabal file or relying on
  the `module' declaration line).  If all works well, this will make C-c C-l
  automatically switch to the root dir, so that dependencies in other
  directories are automatically found.  If it doesn't, complain and/or set
  inferior-haskell-find-project-root to nil.

* The new command haskell-hoogle helps you query Hoogle from Emacs.


___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe