This file is indexed.

/usr/share/doc/libghc-shellac-doc/html/System-Console-Shell-Backend.html is in libghc-shellac-doc 0.9.5.1-2.

This file is owned by root:root, with mode 0o644.

The actual contents of the file can be viewed below.

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"><html xmlns="http://www.w3.org/1999/xhtml"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /><title>System.Console.Shell.Backend</title><link href="ocean.css" rel="stylesheet" type="text/css" title="Ocean" /><script src="haddock-util.js" type="text/javascript"></script><script type="text/javascript">//<![CDATA[
window.onload = function () {pageLoad();setSynopsis("mini_System-Console-Shell-Backend.html");};
//]]>
</script></head><body><div id="package-header"><ul class="links" id="page-menu"><li><a href="src/System-Console-Shell-Backend.html">Source</a></li><li><a href="index.html">Contents</a></li><li><a href="doc-index.html">Index</a></li></ul><p class="caption">Shellac-0.9.5.1: A framework for creating shell envinronments</p></div><div id="content"><div id="module-header"><table class="info"><tr><th>Safe Haskell</th><td>None</td></tr></table><p class="caption">System.Console.Shell.Backend</p></div><div id="description"><p class="caption">Description</p><div class="doc"><p>This module defines the Shellac interface for shell backends.  A shell backend
   is required to provide sensible implementations for <code><a href="System-Console-Shell-Backend.html#v:outputString">outputString</a></code>, <code><a href="System-Console-Shell-Backend.html#v:flushOutput">flushOutput</a></code>,
   <code><a href="System-Console-Shell-Backend.html#v:getSingleChar">getSingleChar</a></code>, <code><a href="System-Console-Shell-Backend.html#v:getInput">getInput</a></code>, and <code><a href="System-Console-Shell-Backend.html#v:getWordBreakChars">getWordBreakChars</a></code>.  All other operations may 
   be noops (however, they must not denote bottom!).
</p><p>This module is intended for use by backend implementers.  It is not intended to
   be used by regular clients of the library.  The Shellac package provides a
   basic backend (<a href="System-Console-Shell-Backend-Basic.html">System.Console.Shell.Backend.Basic</a>).  More advanced backends
   are available in separate packages.
</p></div></div><div id="synopsis"><p id="control.syn" class="caption expander" onclick="toggleSection('syn')">Synopsis</p><ul id="section.syn" class="hide" onclick="toggleSection('syn')"><li class="src short"><span class="keyword">type</span> <a href="#t:CompletionFunction">CompletionFunction</a> = (<a href="/usr/share/doc/ghc-doc/html/libraries/base-4.5.0.0/Data-String.html#t:String">String</a>, <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.5.0.0/Data-String.html#t:String">String</a>, <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.5.0.0/Data-String.html#t:String">String</a>) -&gt; <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.5.0.0/System-IO.html#t:IO">IO</a> (<a href="/usr/share/doc/ghc-doc/html/libraries/base-4.5.0.0/Data-Maybe.html#t:Maybe">Maybe</a> (<a href="/usr/share/doc/ghc-doc/html/libraries/base-4.5.0.0/Data-String.html#t:String">String</a>, [<a href="/usr/share/doc/ghc-doc/html/libraries/base-4.5.0.0/Data-String.html#t:String">String</a>]))</li><li class="src short"><span class="keyword">data</span>  <a href="#t:BackendOutput">BackendOutput</a> <ul class="subs"><li>= <a href="#v:RegularOutput">RegularOutput</a> <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.5.0.0/Data-String.html#t:String">String</a>  </li><li>| <a href="#v:InfoOutput">InfoOutput</a> <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.5.0.0/Data-String.html#t:String">String</a>  </li><li>| <a href="#v:ErrorOutput">ErrorOutput</a> <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.5.0.0/Data-String.html#t:String">String</a>  </li></ul></li><li class="src short"><span class="keyword">data</span>  <a href="#t:ShellBackend">ShellBackend</a> bst = <a href="#v:ShBackend">ShBackend</a> {<ul class="subs"><li><a href="#v:initBackend">initBackend</a> :: <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.5.0.0/System-IO.html#t:IO">IO</a> bst</li><li><a href="#v:shutdownBackend">shutdownBackend</a> :: bst -&gt; <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.5.0.0/System-IO.html#t:IO">IO</a> <a href="/usr/share/doc/ghc-doc/html/libraries/ghc-prim-0.2.0.0/GHC-Tuple.html#t:-40--41-">()</a></li><li><a href="#v:outputString">outputString</a> :: bst -&gt; <a href="System-Console-Shell-Backend.html#t:BackendOutput">BackendOutput</a> -&gt; <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.5.0.0/System-IO.html#t:IO">IO</a> <a href="/usr/share/doc/ghc-doc/html/libraries/ghc-prim-0.2.0.0/GHC-Tuple.html#t:-40--41-">()</a></li><li><a href="#v:flushOutput">flushOutput</a> :: bst -&gt; <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.5.0.0/System-IO.html#t:IO">IO</a> <a href="/usr/share/doc/ghc-doc/html/libraries/ghc-prim-0.2.0.0/GHC-Tuple.html#t:-40--41-">()</a></li><li><a href="#v:getSingleChar">getSingleChar</a> :: bst -&gt; <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.5.0.0/Data-String.html#t:String">String</a> -&gt; <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.5.0.0/System-IO.html#t:IO">IO</a> (<a href="/usr/share/doc/ghc-doc/html/libraries/base-4.5.0.0/Data-Maybe.html#t:Maybe">Maybe</a> <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.5.0.0/Data-Char.html#t:Char">Char</a>)</li><li><a href="#v:getInput">getInput</a> :: bst -&gt; <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.5.0.0/Data-String.html#t:String">String</a> -&gt; <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.5.0.0/System-IO.html#t:IO">IO</a> (<a href="/usr/share/doc/ghc-doc/html/libraries/base-4.5.0.0/Data-Maybe.html#t:Maybe">Maybe</a> <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.5.0.0/Data-String.html#t:String">String</a>)</li><li><a href="#v:addHistory">addHistory</a> :: bst -&gt; <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.5.0.0/Data-String.html#t:String">String</a> -&gt; <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.5.0.0/System-IO.html#t:IO">IO</a> <a href="/usr/share/doc/ghc-doc/html/libraries/ghc-prim-0.2.0.0/GHC-Tuple.html#t:-40--41-">()</a></li><li><a href="#v:setWordBreakChars">setWordBreakChars</a> :: bst -&gt; <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.5.0.0/Data-String.html#t:String">String</a> -&gt; <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.5.0.0/System-IO.html#t:IO">IO</a> <a href="/usr/share/doc/ghc-doc/html/libraries/ghc-prim-0.2.0.0/GHC-Tuple.html#t:-40--41-">()</a></li><li><a href="#v:getWordBreakChars">getWordBreakChars</a> :: bst -&gt; <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.5.0.0/System-IO.html#t:IO">IO</a> <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.5.0.0/Data-String.html#t:String">String</a></li><li><a href="#v:onCancel">onCancel</a> :: bst -&gt; <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.5.0.0/System-IO.html#t:IO">IO</a> <a href="/usr/share/doc/ghc-doc/html/libraries/ghc-prim-0.2.0.0/GHC-Tuple.html#t:-40--41-">()</a></li><li><a href="#v:setAttemptedCompletionFunction">setAttemptedCompletionFunction</a> :: bst -&gt; <a href="System-Console-Shell-Backend.html#t:CompletionFunction">CompletionFunction</a> -&gt; <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.5.0.0/System-IO.html#t:IO">IO</a> <a href="/usr/share/doc/ghc-doc/html/libraries/ghc-prim-0.2.0.0/GHC-Tuple.html#t:-40--41-">()</a></li><li><a href="#v:setDefaultCompletionFunction">setDefaultCompletionFunction</a> :: bst -&gt; <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.5.0.0/Data-Maybe.html#t:Maybe">Maybe</a> (<a href="/usr/share/doc/ghc-doc/html/libraries/base-4.5.0.0/Data-String.html#t:String">String</a> -&gt; <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.5.0.0/System-IO.html#t:IO">IO</a> [<a href="/usr/share/doc/ghc-doc/html/libraries/base-4.5.0.0/Data-String.html#t:String">String</a>]) -&gt; <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.5.0.0/System-IO.html#t:IO">IO</a> <a href="/usr/share/doc/ghc-doc/html/libraries/ghc-prim-0.2.0.0/GHC-Tuple.html#t:-40--41-">()</a></li><li><a href="#v:completeFilename">completeFilename</a> :: bst -&gt; <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.5.0.0/Data-String.html#t:String">String</a> -&gt; <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.5.0.0/System-IO.html#t:IO">IO</a> [<a href="/usr/share/doc/ghc-doc/html/libraries/base-4.5.0.0/Data-String.html#t:String">String</a>]</li><li><a href="#v:completeUsername">completeUsername</a> :: bst -&gt; <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.5.0.0/Data-String.html#t:String">String</a> -&gt; <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.5.0.0/System-IO.html#t:IO">IO</a> [<a href="/usr/share/doc/ghc-doc/html/libraries/base-4.5.0.0/Data-String.html#t:String">String</a>]</li><li><a href="#v:clearHistoryState">clearHistoryState</a> :: bst -&gt; <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.5.0.0/System-IO.html#t:IO">IO</a> <a href="/usr/share/doc/ghc-doc/html/libraries/ghc-prim-0.2.0.0/GHC-Tuple.html#t:-40--41-">()</a></li><li><a href="#v:setMaxHistoryEntries">setMaxHistoryEntries</a> :: bst -&gt; <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.5.0.0/Data-Int.html#t:Int">Int</a> -&gt; <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.5.0.0/System-IO.html#t:IO">IO</a> <a href="/usr/share/doc/ghc-doc/html/libraries/ghc-prim-0.2.0.0/GHC-Tuple.html#t:-40--41-">()</a></li><li><a href="#v:getMaxHistoryEntries">getMaxHistoryEntries</a> :: bst -&gt; <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.5.0.0/System-IO.html#t:IO">IO</a> <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.5.0.0/Data-Int.html#t:Int">Int</a></li><li><a href="#v:readHistory">readHistory</a> :: bst -&gt; <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.5.0.0/System-IO.html#t:FilePath">FilePath</a> -&gt; <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.5.0.0/System-IO.html#t:IO">IO</a> <a href="/usr/share/doc/ghc-doc/html/libraries/ghc-prim-0.2.0.0/GHC-Tuple.html#t:-40--41-">()</a></li><li><a href="#v:writeHistory">writeHistory</a> :: bst -&gt; <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.5.0.0/System-IO.html#t:FilePath">FilePath</a> -&gt; <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.5.0.0/System-IO.html#t:IO">IO</a> <a href="/usr/share/doc/ghc-doc/html/libraries/ghc-prim-0.2.0.0/GHC-Tuple.html#t:-40--41-">()</a></li></ul>}</li><li class="src short"><a href="#v:defaultWordBreakChars">defaultWordBreakChars</a> :: [<a href="/usr/share/doc/ghc-doc/html/libraries/base-4.5.0.0/Data-Char.html#t:Char">Char</a>]</li><li class="src short"><a href="#v:templateBackend">templateBackend</a> ::  a -&gt; <a href="System-Console-Shell-Backend.html#t:ShellBackend">ShellBackend</a> a</li></ul></div><div id="interface"><h1>Documentation</h1><div class="top"><p class="src"><span class="keyword">type</span> <a name="t:CompletionFunction" class="def">CompletionFunction</a> = (<a href="/usr/share/doc/ghc-doc/html/libraries/base-4.5.0.0/Data-String.html#t:String">String</a>, <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.5.0.0/Data-String.html#t:String">String</a>, <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.5.0.0/Data-String.html#t:String">String</a>) -&gt; <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.5.0.0/System-IO.html#t:IO">IO</a> (<a href="/usr/share/doc/ghc-doc/html/libraries/base-4.5.0.0/Data-Maybe.html#t:Maybe">Maybe</a> (<a href="/usr/share/doc/ghc-doc/html/libraries/base-4.5.0.0/Data-String.html#t:String">String</a>, [<a href="/usr/share/doc/ghc-doc/html/libraries/base-4.5.0.0/Data-String.html#t:String">String</a>]))<a href="src/System-Console-Shell-Backend.html#CompletionFunction" class="link">Source</a></p><div class="doc"><p>The type of completion functions.  The argument is a triple
   consisting of (before,word,after), where 'word' is a string
   of non-word-break characters which contains the cursor position.
   'before' is all characters on the line before 'word' and 'after'
   is all characters on the line after word.  The return value should
   be 'Nothing' if no completions can be generated, or
   'Just (newWord,completions)' if completions can be generated.  'newWord'
   is a new string to replace 'word' on the command line and 'completions'
   is a list of all possible completions of 'word'.  To achieve the standard
   &quot;complete-as-far-as-possible&quot; behavior, 'newWord' should be the longest common
   prefix of all words in 'completions'.
</p></div></div><div class="top"><p class="src"><span class="keyword">data</span>  <a name="t:BackendOutput" class="def">BackendOutput</a>  <a href="src/System-Console-Shell-Backend.html#BackendOutput" class="link">Source</a></p><div class="doc"><p>A datatype representing ouput to be printed.  The different categories of
   output are distinguished to that shell backends can, for example, apply
   different colors or send output to different places (stderr versus stdout).
</p></div><div class="subs constructors"><p class="caption">Constructors</p><table><tr><td class="src"><a name="v:RegularOutput" class="def">RegularOutput</a> <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.5.0.0/Data-String.html#t:String">String</a></td><td class="doc"><p>The most regular way to produce output
</p></td></tr><tr><td class="src"><a name="v:InfoOutput" class="def">InfoOutput</a> <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.5.0.0/Data-String.html#t:String">String</a></td><td class="doc"><p>An informative output string, such as command help
</p></td></tr><tr><td class="src"><a name="v:ErrorOutput" class="def">ErrorOutput</a> <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.5.0.0/Data-String.html#t:String">String</a></td><td class="doc"><p>An string generated by an error
</p></td></tr></table></div></div><div class="top"><p class="src"><span class="keyword">data</span>  <a name="t:ShellBackend" class="def">ShellBackend</a> bst <a href="src/System-Console-Shell-Backend.html#ShellBackend" class="link">Source</a></p><div class="doc"><p>This record type contains all the functions that Shellac allows the pluggable
   backend to provide.  Most of these operations are optional and relate to
   advanced features like command completion and history.  However, a shell backend
   is required to provide sensible implementations for <code><a href="System-Console-Shell-Backend.html#v:outputString">outputString</a></code>, <code><a href="System-Console-Shell-Backend.html#v:flushOutput">flushOutput</a></code>,
   <code><a href="System-Console-Shell-Backend.html#v:getSingleChar">getSingleChar</a></code>, <code><a href="System-Console-Shell-Backend.html#v:getInput">getInput</a></code>, and <code><a href="System-Console-Shell-Backend.html#v:getWordBreakChars">getWordBreakChars</a></code>.
</p></div><div class="subs constructors"><p class="caption">Constructors</p><table><tr><td class="src"><a name="v:ShBackend" class="def">ShBackend</a></td><td class="doc empty">&nbsp;</td></tr><tr><td colspan="2"><div class="subs fields"><p class="caption">Fields</p><dl><dt class="src"><a name="v:initBackend" class="def">initBackend</a> :: <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.5.0.0/System-IO.html#t:IO">IO</a> bst</dt><dd class="doc"><p>Provides the backend a way to perform any necessary initialization
   before the shell starts.  This function is called once for each
   shell instance.  The generated value will be passed back in to each call of the
   other methods in this record.
</p></dd><dt class="src"><a name="v:shutdownBackend" class="def">shutdownBackend</a> :: bst -&gt; <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.5.0.0/System-IO.html#t:IO">IO</a> <a href="/usr/share/doc/ghc-doc/html/libraries/ghc-prim-0.2.0.0/GHC-Tuple.html#t:-40--41-">()</a></dt><dd class="doc"><p>Called when the shell exits to allow the backend to perform any necessary
   cleanup actions.
</p></dd><dt class="src"><a name="v:outputString" class="def">outputString</a> :: bst -&gt; <a href="System-Console-Shell-Backend.html#t:BackendOutput">BackendOutput</a> -&gt; <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.5.0.0/System-IO.html#t:IO">IO</a> <a href="/usr/share/doc/ghc-doc/html/libraries/ghc-prim-0.2.0.0/GHC-Tuple.html#t:-40--41-">()</a></dt><dd class="doc"><p>Causes the string to be sent to the underlying console device.
</p></dd><dt class="src"><a name="v:flushOutput" class="def">flushOutput</a> :: bst -&gt; <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.5.0.0/System-IO.html#t:IO">IO</a> <a href="/usr/share/doc/ghc-doc/html/libraries/ghc-prim-0.2.0.0/GHC-Tuple.html#t:-40--41-">()</a></dt><dd class="doc"><p>Perform any operations necessary to clear any output buffers.  After this
   operation, the user should be able to view any output sent to this backend.
</p></dd><dt class="src"><a name="v:getSingleChar" class="def">getSingleChar</a> :: bst -&gt; <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.5.0.0/Data-String.html#t:String">String</a> -&gt; <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.5.0.0/System-IO.html#t:IO">IO</a> (<a href="/usr/share/doc/ghc-doc/html/libraries/base-4.5.0.0/Data-Maybe.html#t:Maybe">Maybe</a> <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.5.0.0/Data-Char.html#t:Char">Char</a>)</dt><dd class="doc"><p>Retrieve a single character from the user without waiting for carriage return.
</p></dd><dt class="src"><a name="v:getInput" class="def">getInput</a> :: bst -&gt; <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.5.0.0/Data-String.html#t:String">String</a> -&gt; <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.5.0.0/System-IO.html#t:IO">IO</a> (<a href="/usr/share/doc/ghc-doc/html/libraries/base-4.5.0.0/Data-Maybe.html#t:Maybe">Maybe</a> <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.5.0.0/Data-String.html#t:String">String</a>)</dt><dd class="doc"><p>Print the prompt and retrieve a line of input from the user.
</p></dd><dt class="src"><a name="v:addHistory" class="def">addHistory</a> :: bst -&gt; <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.5.0.0/Data-String.html#t:String">String</a> -&gt; <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.5.0.0/System-IO.html#t:IO">IO</a> <a href="/usr/share/doc/ghc-doc/html/libraries/ghc-prim-0.2.0.0/GHC-Tuple.html#t:-40--41-">()</a></dt><dd class="doc"><p>Add a string to the history list.
</p></dd><dt class="src"><a name="v:setWordBreakChars" class="def">setWordBreakChars</a> :: bst -&gt; <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.5.0.0/Data-String.html#t:String">String</a> -&gt; <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.5.0.0/System-IO.html#t:IO">IO</a> <a href="/usr/share/doc/ghc-doc/html/libraries/ghc-prim-0.2.0.0/GHC-Tuple.html#t:-40--41-">()</a></dt><dd class="doc"><p>Set the characters which define word boundaries.  This is mostly used
   for defining where completions occur.
</p></dd><dt class="src"><a name="v:getWordBreakChars" class="def">getWordBreakChars</a> :: bst -&gt; <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.5.0.0/System-IO.html#t:IO">IO</a> <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.5.0.0/Data-String.html#t:String">String</a></dt><dd class="doc"><p>Get the current set of word break characters.
</p></dd><dt class="src"><a name="v:onCancel" class="def">onCancel</a> :: bst -&gt; <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.5.0.0/System-IO.html#t:IO">IO</a> <a href="/usr/share/doc/ghc-doc/html/libraries/ghc-prim-0.2.0.0/GHC-Tuple.html#t:-40--41-">()</a></dt><dd class="doc"><p>A callback to run whenever evaluation or a command is canceled
   by the keyboard signal
</p></dd><dt class="src"><a name="v:setAttemptedCompletionFunction" class="def">setAttemptedCompletionFunction</a> :: bst -&gt; <a href="System-Console-Shell-Backend.html#t:CompletionFunction">CompletionFunction</a> -&gt; <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.5.0.0/System-IO.html#t:IO">IO</a> <a href="/usr/share/doc/ghc-doc/html/libraries/ghc-prim-0.2.0.0/GHC-Tuple.html#t:-40--41-">()</a></dt><dd class="doc"><p>A completion function that is tried first.
</p></dd><dt class="src"><a name="v:setDefaultCompletionFunction" class="def">setDefaultCompletionFunction</a> :: bst -&gt; <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.5.0.0/Data-Maybe.html#t:Maybe">Maybe</a> (<a href="/usr/share/doc/ghc-doc/html/libraries/base-4.5.0.0/Data-String.html#t:String">String</a> -&gt; <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.5.0.0/System-IO.html#t:IO">IO</a> [<a href="/usr/share/doc/ghc-doc/html/libraries/base-4.5.0.0/Data-String.html#t:String">String</a>]) -&gt; <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.5.0.0/System-IO.html#t:IO">IO</a> <a href="/usr/share/doc/ghc-doc/html/libraries/ghc-prim-0.2.0.0/GHC-Tuple.html#t:-40--41-">()</a></dt><dd class="doc"><p>An alternate function to generate completions.  The function given takes the
   word as an argument and generates all possible completions.  This function is called
   (if set) after the attemptedCompletionFunction if it returns 'Nothing'.
</p></dd><dt class="src"><a name="v:completeFilename" class="def">completeFilename</a> :: bst -&gt; <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.5.0.0/Data-String.html#t:String">String</a> -&gt; <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.5.0.0/System-IO.html#t:IO">IO</a> [<a href="/usr/share/doc/ghc-doc/html/libraries/base-4.5.0.0/Data-String.html#t:String">String</a>]</dt><dd class="doc"><p>A backend-provided method to complete filenames.
</p></dd><dt class="src"><a name="v:completeUsername" class="def">completeUsername</a> :: bst -&gt; <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.5.0.0/Data-String.html#t:String">String</a> -&gt; <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.5.0.0/System-IO.html#t:IO">IO</a> [<a href="/usr/share/doc/ghc-doc/html/libraries/base-4.5.0.0/Data-String.html#t:String">String</a>]</dt><dd class="doc"><p>A backend-provided method to complete usernames.
</p></dd><dt class="src"><a name="v:clearHistoryState" class="def">clearHistoryState</a> :: bst -&gt; <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.5.0.0/System-IO.html#t:IO">IO</a> <a href="/usr/share/doc/ghc-doc/html/libraries/ghc-prim-0.2.0.0/GHC-Tuple.html#t:-40--41-">()</a></dt><dd class="doc"><p>An operation to clear the history buffer.
</p></dd><dt class="src"><a name="v:setMaxHistoryEntries" class="def">setMaxHistoryEntries</a> :: bst -&gt; <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.5.0.0/Data-Int.html#t:Int">Int</a> -&gt; <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.5.0.0/System-IO.html#t:IO">IO</a> <a href="/usr/share/doc/ghc-doc/html/libraries/ghc-prim-0.2.0.0/GHC-Tuple.html#t:-40--41-">()</a></dt><dd class="doc"><p>Sets the maximum number of entries managed by the history buffer.
</p></dd><dt class="src"><a name="v:getMaxHistoryEntries" class="def">getMaxHistoryEntries</a> :: bst -&gt; <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.5.0.0/System-IO.html#t:IO">IO</a> <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.5.0.0/Data-Int.html#t:Int">Int</a></dt><dd class="doc"><p>Gets the maximum number of entries managed by the history buffer.
</p></dd><dt class="src"><a name="v:readHistory" class="def">readHistory</a> :: bst -&gt; <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.5.0.0/System-IO.html#t:FilePath">FilePath</a> -&gt; <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.5.0.0/System-IO.html#t:IO">IO</a> <a href="/usr/share/doc/ghc-doc/html/libraries/ghc-prim-0.2.0.0/GHC-Tuple.html#t:-40--41-">()</a></dt><dd class="doc"><p>Read the history buffer from a file.  The file should be formatted
   as plain-text, with each line in the file representing a single command
   entered, most recent commands at the bottom. (This format is what readline
   produces)
</p></dd><dt class="src"><a name="v:writeHistory" class="def">writeHistory</a> :: bst -&gt; <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.5.0.0/System-IO.html#t:FilePath">FilePath</a> -&gt; <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.5.0.0/System-IO.html#t:IO">IO</a> <a href="/usr/share/doc/ghc-doc/html/libraries/ghc-prim-0.2.0.0/GHC-Tuple.html#t:-40--41-">()</a></dt><dd class="doc"><p>Write the history buffer to a file.  The file should be formatted in the
   same way as in the description for <code><a href="System-Console-Shell-Backend.html#v:readHistory">readHistory</a></code>.
</p></dd></dl><div class="clear"></div></div></td></tr></table></div></div><div class="top"><p class="src"><a name="v:defaultWordBreakChars" class="def">defaultWordBreakChars</a> :: [<a href="/usr/share/doc/ghc-doc/html/libraries/base-4.5.0.0/Data-Char.html#t:Char">Char</a>]<a href="src/System-Console-Shell-Backend.html#defaultWordBreakChars" class="link">Source</a></p><div class="doc"><p>Provides a sane default set of characters to use when breaking
   lines into 'words'.  If a backend does not have configurable
   word break characters, then <code>getWordBreakCharacters</code> can just
   return this default set.
</p></div></div><div class="top"><p class="src"><a name="v:templateBackend" class="def">templateBackend</a> ::  a -&gt; <a href="System-Console-Shell-Backend.html#t:ShellBackend">ShellBackend</a> a<a href="src/System-Console-Shell-Backend.html#templateBackend" class="link">Source</a></p><div class="doc"><p>This backend template is useful for defining custom backends.
   The idea is that you will use <code><a href="System-Console-Shell-Backend.html#v:templateBackend">templateBackend</a></code> to generate a
   bare-bones backend implemenation and only fill in the methods
   that you wish to define using the record update syntax.
   The parameter to <code><a href="System-Console-Shell-Backend.html#v:templateBackend">templateBackend</a></code>
   becomes the backend state associated with the backend and is
   passed into to each of the operation methods.
</p></div></div></div></div><div id="footer"><p>Produced by <a href="http://www.haskell.org/haddock/">Haddock</a> version 2.10.0</p></div></body></html>