evancz/elm-repl — pull request #17 by maxsnew (2013-12-29 03:56:59+00:00)
Title: Exit on EOF (Ctrl-D), interrupt on Ctrl-C.

Changes behavior of EOF (Ctrl-D) and Ctrl-C.

On EOF (Ctrl-D in the repl), exits the repl.

On Ctrl-C, interrupts the program in execution.
This means that Ctrl-C can be used to interrupt a long-running
computation (tested with a js `while (true) ;` on my machine).

This is standard shell/repl behavior. I've only seen the Ctrl-C twice behavior in node but I think this behavior is simpler conceptually since it means ctrl-D and ctrl-C have exactly one role. The behavior here is found in the following repls on my machine:
1. Haskell
2. Python
3. Ruby

This is also, of course, the behavior of bash/every other unix shell.