Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to evaluate a single expression in Haskell mode for Emacs?

Tags:

emacs

haskell

In Lisp or Scheme buffers it is possible to evaluate a single expression by pressing C-x C-e which calls eval-last-sexp. But eval-last-sexp works only for literals in Haskell. What is the equivalent way to do the same in the Haskell mode?

like image 853
ceving Avatar asked Jun 20 '11 10:06

ceving


1 Answers

eval-last-sexp is a command from emacs-lisp-mode, and has no bearing on Haskell Mode which is presumably what you want.

If you've correctly set up inf-haskell.el, then C-c C-i will bring up a ghci session with your current buffer interpreted.

like image 119
Raeez Avatar answered Oct 14 '22 15:10

Raeez