Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
37 changes: 37 additions & 0 deletions doc/haskell-mode.texi
Original file line number Diff line number Diff line change
Expand Up @@ -751,6 +751,43 @@ these keybindings:
You have to load the module before it works, after that it will remember
for the current GHCi session.

@section Customizing

@cindex customizing
What kind of Haskell REPL @code{haskell-interactive-mode} will start up
depends on the value of @code{haskell-process-type}. This can be one of
the symbols @code{auto}, @code{ghci}, @code{cabal-repl}, or
@code{stack-ghci}. If it's @code{auto}, the directory contents and
available programs will be used to make a best guess at the
process type. The actual process type will then determine which
variables @code{haskell-interactive-mode} will access to determine the
program to start and its arguments:

@itemize
@item
If it's @code{ghci}, @code{haskell-process-path-ghci} and
@code{haskell-process-args-ghci} will be used.
@item
If it's @code{cabal-repl}, @code{haskell-process-path-ghci} and
@code{haskell-process-args-ghci}.
@item
If it's @code{stack-ghci}, @code{haskell-process-path-stack} and
@code{haskell-process-args-stack-ghci} will be used.
@end itemize

With each of these pairs, the the @code{haskell-process-path-...}
variable needs to be a string specifying the program path, or a list of
strings where the first element is the program path and the rest are
initial arguments. The @code{haskell-process-args-...} is a list of
strings specifying (further) command-line arguments.

@vindex haskell-process-type
@vindex haskell-process-path-ghci
@vindex haskell-process-path-cabal
@vindex haskell-process-path-stack
@vindex haskell-process-args-ghci
@vindex haskell-process-args-cabal-repl
@vindex haskell-process-args-stack-ghci

@node Editing Cabal files
@chapter Editing Cabal files
Expand Down
15 changes: 12 additions & 3 deletions haskell-customize.el
Original file line number Diff line number Diff line change
Expand Up @@ -115,19 +115,28 @@ when showing type information about symbols."

(defcustom haskell-process-path-ghci
"ghci"
"The path for starting ghci."
"The path for starting ghci.
This can either be a single string or a list of strings, where the
first elements is a string and the remaining elements are arguments,
which will be prepended to `haskell-process-args-ghci'."
:group 'haskell-interactive
:type '(choice string (repeat string)))

(defcustom haskell-process-path-cabal
"cabal"
"Path to the `cabal' executable."
"Path to the `cabal' executable.
This can either be a single string or a list of strings, where the
first elements is a string and the remaining elements are arguments,
which will be prepended to `haskell-process-args-cabal-repl'."
:group 'haskell-interactive
:type '(choice string (repeat string)))

(defcustom haskell-process-path-stack
"stack"
"The path for starting stack."
"The path for starting stack.
This can either be a single string or a list of strings, where the
first elements is a string and the remaining elements are arguments,
which will be prepended to `haskell-process-args-stack-ghci'."
:group 'haskell-interactive
:type '(choice string (repeat string)))

Expand Down