Skip to content

Commit d4e2e33

Browse files
committed
Merge pull request #1135 from mikesperber/haskell-process-path-stuff
Docstrings and documentation for haskell-process-path-*.
2 parents 1647f09 + b0a0c55 commit d4e2e33

File tree

2 files changed

+49
-3
lines changed

2 files changed

+49
-3
lines changed

doc/haskell-mode.texi

Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -751,6 +751,43 @@ these keybindings:
751751
You have to load the module before it works, after that it will remember
752752
for the current GHCi session.
753753

754+
@section Customizing
755+
756+
@cindex customizing
757+
What kind of Haskell REPL @code{haskell-interactive-mode} will start up
758+
depends on the value of @code{haskell-process-type}. This can be one of
759+
the symbols @code{auto}, @code{ghci}, @code{cabal-repl}, or
760+
@code{stack-ghci}. If it's @code{auto}, the directory contents and
761+
available programs will be used to make a best guess at the
762+
process type. The actual process type will then determine which
763+
variables @code{haskell-interactive-mode} will access to determine the
764+
program to start and its arguments:
765+
766+
@itemize
767+
@item
768+
If it's @code{ghci}, @code{haskell-process-path-ghci} and
769+
@code{haskell-process-args-ghci} will be used.
770+
@item
771+
If it's @code{cabal-repl}, @code{haskell-process-path-ghci} and
772+
@code{haskell-process-args-ghci}.
773+
@item
774+
If it's @code{stack-ghci}, @code{haskell-process-path-stack} and
775+
@code{haskell-process-args-stack-ghci} will be used.
776+
@end itemize
777+
778+
With each of these pairs, the the @code{haskell-process-path-...}
779+
variable needs to be a string specifying the program path, or a list of
780+
strings where the first element is the program path and the rest are
781+
initial arguments. The @code{haskell-process-args-...} is a list of
782+
strings specifying (further) command-line arguments.
783+
784+
@vindex haskell-process-type
785+
@vindex haskell-process-path-ghci
786+
@vindex haskell-process-path-cabal
787+
@vindex haskell-process-path-stack
788+
@vindex haskell-process-args-ghci
789+
@vindex haskell-process-args-cabal-repl
790+
@vindex haskell-process-args-stack-ghci
754791

755792
@node Editing Cabal files
756793
@chapter Editing Cabal files

haskell-customize.el

Lines changed: 12 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -115,19 +115,28 @@ when showing type information about symbols."
115115

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

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

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

0 commit comments

Comments
 (0)