Re: [Haskell-beginners] how to enter EOF in emacs haskell mode

Hi,
If it's anything like other interactive modes, does
C-c C-d do the job of signalling EOF?
Shrivats
On Sep 14, 2016 15:53, "Chul-Woong Yang"

No. Usual `C-c C-d' (comint-send-eof) does not work in haskell-mode's interactive buffer. It is not defined, emacs responds as follows:
C-c C-d is undefined
2016-09-14 20:01 GMT+09:00 Shrivats
Hi,
If it's anything like other interactive modes, does C-c C-d do the job of signalling EOF?
Shrivats
On Sep 14, 2016 15:53, "Chul-Woong Yang"
wrote: Hi, all.
I use emacs haskell mode for editing and testing simple programs. I have no success in finding out how to enter EOF to haskell program in emacs "Interactive-Haskell" buffer. So I am unable to test haskell program which reads from stdin. :-(
Any help would be appreciated deeply.
Regards, Chul-Woong Yang
_______________________________________________ Beginners mailing list Beginners@haskell.org http://mail.haskell.org/cgi-bin/mailman/listinfo/beginners
_______________________________________________ Beginners mailing list Beginners@haskell.org http://mail.haskell.org/cgi-bin/mailman/listinfo/beginners

So have you tried `M-x comint-send-eof RET` then? If that works, it is just
a matter of binding it to whatever you want.
Chul-Woong Yang
No. Usual `C-c C-d' (comint-send-eof) does not work in haskell-mode's interactive buffer. It is not defined, emacs responds as follows:
C-c C-d is undefined
2016-09-14 20:01 GMT+09:00 Shrivats
: Hi,
If it's anything like other interactive modes, does C-c C-d do the job of signalling EOF?
Shrivats
On Sep 14, 2016 15:53, "Chul-Woong Yang"
wrote: Hi, all.
I use emacs haskell mode for editing and testing simple programs. I have no success in finding out how to enter EOF to haskell program in emacs "Interactive-Haskell" buffer. So I am unable to test haskell program which reads from stdin. :-(
Any help would be appreciated deeply.
Regards, Chul-Woong Yang
_______________________________________________ Beginners mailing list Beginners@haskell.org http://mail.haskell.org/cgi-bin/mailman/listinfo/beginners
_______________________________________________ Beginners mailing list Beginners@haskell.org http://mail.haskell.org/cgi-bin/mailman/listinfo/beginners
_______________________________________________ Beginners mailing list Beginners@haskell.org http://mail.haskell.org/cgi-bin/mailman/listinfo/beginners

Yes, I've tried comint-send-eof with no success:
> Current buffer has no process
haskell-mode's comint-interface is deprecated.
No success with googling and browsing of documentions on haskell-mode.
2016-09-15 0:46 GMT+09:00 Norbert Melzer
So have you tried `M-x comint-send-eof RET` then? If that works, it is just a matter of binding it to whatever you want.
Chul-Woong Yang
schrieb am Mi., 14. Sep. 2016 um 17:06 Uhr: No. Usual `C-c C-d' (comint-send-eof) does not work in haskell-mode's interactive buffer. It is not defined, emacs responds as follows:
C-c C-d is undefined
2016-09-14 20:01 GMT+09:00 Shrivats
: Hi,
If it's anything like other interactive modes, does C-c C-d do the job of signalling EOF?
Shrivats
On Sep 14, 2016 15:53, "Chul-Woong Yang"
wrote: Hi, all.
I use emacs haskell mode for editing and testing simple programs. I have no success in finding out how to enter EOF to haskell program in emacs "Interactive-Haskell" buffer. So I am unable to test haskell program which reads from stdin. :-(
Any help would be appreciated deeply.
Regards, Chul-Woong Yang
_______________________________________________ Beginners mailing list Beginners@haskell.org http://mail.haskell.org/cgi-bin/mailman/listinfo/beginners
_______________________________________________ Beginners mailing list Beginners@haskell.org http://mail.haskell.org/cgi-bin/mailman/listinfo/beginners
_______________________________________________ Beginners mailing list Beginners@haskell.org http://mail.haskell.org/cgi-bin/mailman/listinfo/beginners
_______________________________________________ Beginners mailing list Beginners@haskell.org http://mail.haskell.org/cgi-bin/mailman/listinfo/beginners

Putting following code to .emacs solves the problem.
--
(defun haskell-send-eof ()
"send eof to interactive buffer"
(interactive)
(process-send-eof (haskell-process-process (haskell-interactive-process))))
(add-hook 'haskell-interactive-mode-hook
(lambda () (local-set-key (kbd "C-c C-d") 'haskell-send-eof)))
2016-09-15 1:17 GMT+09:00 Chul-Woong Yang
Yes, I've tried comint-send-eof with no success:
Current buffer has no process
haskell-mode's comint-interface is deprecated. No success with googling and browsing of documentions on haskell-mode.
2016-09-15 0:46 GMT+09:00 Norbert Melzer
: So have you tried `M-x comint-send-eof RET` then? If that works, it is just a matter of binding it to whatever you want.
Chul-Woong Yang
schrieb am Mi., 14. Sep. 2016 um 17:06 Uhr: No. Usual `C-c C-d' (comint-send-eof) does not work in haskell-mode's interactive buffer. It is not defined, emacs responds as follows:
C-c C-d is undefined
2016-09-14 20:01 GMT+09:00 Shrivats
: Hi,
If it's anything like other interactive modes, does C-c C-d do the job of signalling EOF?
Shrivats
On Sep 14, 2016 15:53, "Chul-Woong Yang"
wrote: Hi, all.
I use emacs haskell mode for editing and testing simple programs. I have no success in finding out how to enter EOF to haskell program in emacs "Interactive-Haskell" buffer. So I am unable to test haskell program which reads from stdin. :-(
Any help would be appreciated deeply.
Regards, Chul-Woong Yang
_______________________________________________ Beginners mailing list Beginners@haskell.org http://mail.haskell.org/cgi-bin/mailman/listinfo/beginners
_______________________________________________ Beginners mailing list Beginners@haskell.org http://mail.haskell.org/cgi-bin/mailman/listinfo/beginners
_______________________________________________ Beginners mailing list Beginners@haskell.org http://mail.haskell.org/cgi-bin/mailman/listinfo/beginners
_______________________________________________ Beginners mailing list Beginners@haskell.org http://mail.haskell.org/cgi-bin/mailman/listinfo/beginners
participants (3)
-
Chul-Woong Yang
-
Norbert Melzer
-
Shrivats