To start the REPL you can run one of the following:
This repl works with Comint. So you will feel at home if you are already using M-x Shell or M-x ielm.
Inf-Haskell is a Major mode for running GHCi, with comint.
Important key bindings in
invokes comint-send-input. Sends the input to the GHCi process, evaluates the line and returns the output.
deletes the forward character
invokes comint-previous-input. Cycle backwards through input history, saving input.
invokes comint-next-input. Cycle forwards through input history.
invokes comint-interrupt-subjob. Sends KeyboardInterrupt signal.
invokes comint-quit-subjob. Sends KeyboardInterrupt signal.
invokes comint-stop-subjob. Kills the GHCi process.
invokes comint-previous-matching-input-from-input. If you are familiar with C-r in bash. This is the same as that. Searches backwards through input history for match for current input.
invokes comint-next-matching-input-from-input. Searches forwards through input history for match for current input.
invokes comint-dynamic-list-input-ring. Displays a list of recent inputs entered into the current buffer.
invokes comint-clear-buffer. Clears the buffer (Only with Emacs 25.X and above)
invokes comint-next-prompt. Goes to the start of the previous REPL prompt.
invokes comint-previous-prompt. Goes to the start of the next REPL prompt.
invokes comint-delete-output. Clears the output of the most recently evaluated expression.
invokes comint-show-maximum-output. Moves the point to the end of the buffer.
invokes comint-kill-input. Kills backward, the line at point. (Use this when you have typed in an expression into the prompt but you dont want to evaluate it.)
invokes backward-kill-word. Kills backward, the word at point
invokes comint-write-output. Write output from interpreter since last input to FILENAME. Any prompt at the end of the output is not written.
|Interpreter (defcustom)||Default Value||Possible Values|
The Haskell interpreter used by
Inf-Haskell is auto-detected by default,
but is customizable with defcustom
haskell-process-type. The values
recognized by it are (default is ’auto):
'auto, the directories are searched for
If the file is present, then appropriate process is started.
cabal.sandbox.config is found
stack.yaml is found
xyz.cabal is found
When nothing is found
'ghci. When more than one
file such as
stack.yaml are found the following
preference is followed.