[Haskell-beginners] Different versions of ghci REPL in Emacs?

Lawrence Bottorff borgauf at gmail.com
Sun Mar 22 04:42:53 UTC 2020


I'm using Emacs (26.3) and org-mode (9.3.6) and I seem to have two
different versions of ghci going, depending on whether I'm using
haskell-mode alone with a *.hs file, or whether I am evaluating an org-mode
babel code block.

If I open, say, test.hs in Emacs, haskell-mode starts up. And if I choose
<Start interpreter> from the menu, I get this "lambda prompt" REPL

The next big Haskell project is about to start!
If I break, you can:
  1. Restart:           M-x haskell-process-restart
  2. Configure logging: C-h v haskell-process-log (useful for debugging)
  3. General config:    M-x customize-mode
  4. Hide these tips:   C-h v haskell-process-show-debug-tips
λ>

But if I call M-run-haskell, I get this "Prelude prompt" REPL

Configuring GHCi with the following packages:
GHCi, version 8.6.5: http://www.haskell.org/ghc/  :? for help
Loaded GHCi configuration from /home/lawrence/.ghc/ghci.conf
Prelude> Prelude>

and this babel bit knows and interacts with it

#+BEGIN_SRC haskell :results output
:set +m
doubleMe x = x + x
doubleUs x y = doubleMe x + doubleMe y
#+END_SRC

but then trying to run this code block with lambda prompt REPL, I get the
error

executing Haskell code block...
org-babel-execute:haskell: Buffer *haskell* does not exist or has no process

even though the lambda REPL is called *haskell*. Why am I getting two
separate REPLs?
BTW, which IDE do Haskell big boys and girls use?

LB
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.haskell.org/pipermail/beginners/attachments/20200321/6a6b7463/attachment.html>


More information about the Beginners mailing list