[Agda] emacs hangs when loading agda2-mode

Nils Anders Danielsson nils.anders.danielsson at gmail.com
Sun May 18 14:38:18 CEST 2008


On Sun, May 18, 2008 at 2:11 AM, Brent Yorgey <byorgey at gmail.com> wrote:
>
> Apparently agda2-mode looks for the Prelude> prompt in particular to
> see when ghci is ready, or something like that.  Is there any good
> reason for this, or could it (say) just look for the > at the end of
> the prompt?

Agda mode uses Haskell mode, which in turn uses the following regexp
to detect the prompt:

  ^\\*?[A-Z][\\._a-zA-Z0-9]*\\( \\*?[A-Z][\\._a-zA-Z0-9]*\\)*>

We can fix your problem by telling ghci not to read .ghci. However,
this might create problems for someone else who has put settings in
.ghci required to load the Agda library. I cannot imagine why anyone
would use such a setup, though, so I have now changed the Agda mode to
start ghci with -ignore-dot-ghci. If anyone should require the
previous behaviour they can simply add -read-dot-ghci to
haskell-ghci-program-args (possibly from agda2-mode-hook).

(As usual you need to wait until Ulf has applied my patch before you
can pull it.)

-- 
/NAD


More information about the Agda mailing list