From b0a0c5556e668ee38462d71f41a20804bb5470fe Mon Sep 17 00:00:00 2001 From: Mike Sperber Date: Fri, 5 Feb 2016 15:13:21 +0100 Subject: [PATCH] Docstrings and documentation for haskell-process-path-*. (In the wake of #1112.) --- doc/haskell-mode.texi | 37 +++++++++++++++++++++++++++++++++++++ haskell-customize.el | 15 ++++++++++++--- 2 files changed, 49 insertions(+), 3 deletions(-) diff --git a/doc/haskell-mode.texi b/doc/haskell-mode.texi index 22b8732b0..4f7293cc8 100644 --- a/doc/haskell-mode.texi +++ b/doc/haskell-mode.texi @@ -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 diff --git a/haskell-customize.el b/haskell-customize.el index b9c2efc70..0516acc5b 100644 --- a/haskell-customize.el +++ b/haskell-customize.el @@ -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)))