Zura_ <[email protected]> writes:
> Hello,
>
> Is it possible to run haskell program in emacs without typing "main" in the
> ghci buffer? Assuming "main" function exists of course.
> Or, maybe automate sending "main\n" string to ghci buffer input.
> In other words, I want edit/run/see result style session.
Assuming you're using haskell-mode, does
M-x inferior-haskell-load-and-run
do what you want? You can of course define a shortcut for it:
(define-key haskell-mode-map "\C-l" 'inferior-haskell-load-and-run)
If you don't want to load the file, just run main:
(defun haskell-main ()
(interactive)
(inferior-haskell-send-command (inferior-haskell-process)
":main"))
(This a very simple version; there're many possible variations; for
instance, adding (swith-to-haskell) at the end).
HTH,
jao
_______________________________________________
Haskell-Cafe mailing list
[email protected]
http://www.haskell.org/mailman/listinfo/haskell-cafe