This file is indexed.

/usr/share/doc/mlton/guide/Enscript is in mlton-doc 20100608-5.

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
 78
 79
 80
 81
 82
 83
 84
 85
 86
 87
 88
 89
 90
 91
 92
 93
 94
 95
 96
 97
 98
 99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
<html>
<head>
<meta name="robots" content="index,nofollow">



<title>Enscript - MLton Standard ML Compiler (SML Compiler)</title>
<link rel="stylesheet" type="text/css" charset="iso-8859-1" media="all" href="common.css">
<link rel="stylesheet" type="text/css" charset="iso-8859-1" media="screen" href="screen.css">
<link rel="stylesheet" type="text/css" charset="iso-8859-1" media="print" href="print.css">


<link rel="Start" href="Home">


</head>

<body lang="en" dir="ltr">

<script src="http://www.google-analytics.com/urchin.js" type="text/javascript">
</script>
<script type="text/javascript">
_uacct = "UA-833377-1";
urchinTracker();
</script>
<table bgcolor = lightblue cellspacing = 0 style = "border: 0px;" width = 100%>
  <tr>
    <td style = "
		border: 0px;
		color: darkblue; 
		font-size: 150%;
		text-align: left;">
      <a class = mltona href="Home">MLton MLTONWIKIVERSION</a>
    <td style = "
		border: 0px;
		font-size: 150%;
		text-align: center;
		width: 50%;">
      Enscript
    <td style = "
		border: 0px;
		text-align: right;">
      <table cellspacing = 0 style = "border: 0px">
        <tr style = "vertical-align: middle;">
      </table>
  <tr style = "background-color: white;">
    <td colspan = 3
	style = "
		border: 0px;
		font-size:70%;
		text-align: right;">
      <a href = "Home">Home</a>
      &nbsp;<a href = "TitleIndex">Index</a>
      &nbsp;
</table>
<div id="content" lang="en" dir="ltr">
<a class="external" href="http://people.ssh.com/mtr/genscript"><img src="moin-www.png" alt="[WWW]" height="11" width="11">GNU Enscript</a> converts ASCII files to PostScript, HTML, and other output languages,  applying language sensitive highlighting (similar to <a href="Emacs">Emacs</a>'s font lock mode).  Here are a few <em>states</em> files for highlighting <a href="StandardML"> Standard ML</a>. 
    <ul>

    <li>
<p>
 <a href = "http://mlton.org/cgi-bin/viewsvn.cgi/mlton/tags/on-MLTONWIKIVERSION-release/ide/enscript/sml_simple.st?view=markup"><img src="moin-www.png" alt="[WWW]" height="11" width="11">sml_simple.st</a> -- Provides highlighting of keywords, string and character constants, and (nested) comments.  
<pre class=code>
<I><FONT COLOR="#B22222">(* Comments (* can be nested *) *)</FONT></I>
<B><FONT COLOR="#A020F0">structure</FONT></B> S = <B><FONT COLOR="#A020F0">struct</FONT></B>
  <B><FONT COLOR="#A020F0">val</FONT></B> x = (1, 2, <B><FONT COLOR="#BC8F8F">&quot;three&quot;</FONT></B>)
<B><FONT COLOR="#A020F0">end</FONT></B>
</PRE>
 
</p>
</li>
    <li class="gap">
<p>
 <a href = "http://mlton.org/cgi-bin/viewsvn.cgi/mlton/tags/on-MLTONWIKIVERSION-release/ide/enscript/sml_verbose.st?view=markup"><img src="moin-www.png" alt="[WWW]" height="11" width="11">sml_verbose.st</a> -- Supersedes the above, adding  highlighting of numeric constants.  Due to the limited parsing  available, numeric record labels are highlighted as numeric  constants, in all contexts.  Likewise, a binding precedence separated  from <tt>infix</tt> or <tt>infixr</tt> by a newline is highlighted as a  numeric constant and a numeric record label selector separated from  <tt>#</tt> by a newline is highlighted as a numeric constant.  
</p>
 
<pre class=code>
<B><FONT COLOR="#A020F0">structure</FONT></B> S = <B><FONT COLOR="#A020F0">struct</FONT></B>
  <I><FONT COLOR="#B22222">(* These look good *)</FONT></I>
  <B><FONT COLOR="#A020F0">val</FONT></B> x = (<B><FONT COLOR="#5F9EA0">1</FONT></B>, <B><FONT COLOR="#5F9EA0">2</FONT></B>, <B><FONT COLOR="#BC8F8F">&quot;three&quot;</FONT></B>)
  <B><FONT COLOR="#A020F0">val</FONT></B> z = #2 x

  <I><FONT COLOR="#B22222">(* Although these look bad (not all the numbers are constants),       *
   * they never occur in practice, as they are equivalent to the above. *)</FONT></I>
  <B><FONT COLOR="#A020F0">val</FONT></B> x = {<B><FONT COLOR="#5F9EA0">1</FONT></B> = <B><FONT COLOR="#5F9EA0">1</FONT></B>, <B><FONT COLOR="#5F9EA0">3</FONT></B> = <B><FONT COLOR="#BC8F8F">&quot;three&quot;</FONT></B>, <B><FONT COLOR="#5F9EA0">2</FONT></B> = <B><FONT COLOR="#5F9EA0">2</FONT></B>}
  <B><FONT COLOR="#A020F0">val</FONT></B> z = #
            <B><FONT COLOR="#5F9EA0">2</FONT></B> x
<B><FONT COLOR="#A020F0">end</FONT></B>
</PRE>
<p>
 
</p>
</li>
    <li class="gap">
<p>
 <a href = "http://mlton.org/cgi-bin/viewsvn.cgi/mlton/tags/on-MLTONWIKIVERSION-release/ide/enscript/sml_fancy.st?view=markup"><img src="moin-www.png" alt="[WWW]" height="11" width="11">sml_fancy.st</a> -- Supersedes the above, adding  highlighting of type and constructor bindings, highlighting of  explicit binding of type variables at <tt>val</tt> and <tt>fun</tt> declarations, and  separate highlighting of core and modules level keywords.  Due to the  limited parsing available, it is assumed that the input is a  syntactically correct, top-level declaration.  
<pre class=code>
<B><FONT COLOR="#0000FF">structure</FONT></B> S = <B><FONT COLOR="#0000FF">struct</FONT></B>
  <B><FONT COLOR="#A020F0">val</FONT></B> x = (<B><FONT COLOR="#5F9EA0">1</FONT></B>, <B><FONT COLOR="#5F9EA0">2</FONT></B>, <B><FONT COLOR="#BC8F8F">&quot;three&quot;</FONT></B>)
  <B><FONT COLOR="#A020F0">datatype</FONT></B><B><FONT COLOR="#228B22"> 'a t </FONT></B>=<B><FONT COLOR="#228B22"> <FONT COLOR="#B8860B">T</FONT> <B><FONT COLOR="#A020F0">of</FONT></B> 'a
       </FONT></B><B><FONT COLOR="#A020F0">and</FONT></B><B><FONT COLOR="#228B22"> u </FONT></B>=<B><FONT COLOR="#228B22"> <FONT COLOR="#B8860B">U</FONT> <B><FONT COLOR="#A020F0">of</FONT></B> v * v
  </FONT></B><B><FONT COLOR="#A020F0">withtype</FONT></B><B><FONT COLOR="#228B22"> v </FONT></B>=<B><FONT COLOR="#228B22"> {left: int t, right: int t}
  </FONT></B><B><FONT COLOR="#A020F0">exception</FONT></B><B><FONT COLOR="#228B22"> <FONT COLOR="#B8860B">E1</FONT> <B><FONT COLOR="#A020F0">of</FONT></B> int </FONT></B><B><FONT COLOR="#A020F0">and</FONT></B><B><FONT COLOR="#228B22"> <FONT COLOR="#B8860B">E2</FONT>
  </FONT></B><B><FONT COLOR="#A020F0">fun</FONT></B> <B><FONT COLOR="#228B22">'a</FONT></B> id (x: 'a) : 'a = x

  <I><FONT COLOR="#B22222">(* Although this looks bad (the explicitly bound type variable 'a is *
   * not highlighted), it is unlikely to occur in practice.            *)</FONT></I>
  <B><FONT COLOR="#A020F0">val</FONT></B> 
      'a id = <B><FONT COLOR="#A020F0">fn</FONT></B> (x : 'a) =&gt; x
<B><FONT COLOR="#0000FF">end</FONT></B>
</PRE>
 
</p>
</li>
    <li class="gap">
<p>
 <a href = "http://mlton.org/cgi-bin/viewsvn.cgi/mlton/tags/on-MLTONWIKIVERSION-release/ide/enscript/sml_gaudy.st?view=markup"><img src="moin-www.png" alt="[WWW]" height="11" width="11">sml_gaudy.st</a> -- Supersedes the above, adding  highlighting of type annotations, in both expressions and signatures.  Due to the limited parsing available, it is assumed that the input is  a syntactically correct, top-level declaration.   
<pre class=code>
<B><FONT COLOR="#0000FF">signature</FONT></B> S = <B><FONT COLOR="#0000FF">sig</FONT></B>
  <B><FONT COLOR="#A020F0">type</FONT></B><B><FONT COLOR="#228B22"> t
  </FONT></B><B><FONT COLOR="#A020F0">val</FONT></B> x :<B><FONT COLOR="#228B22"> t
  </FONT></B><B><FONT COLOR="#A020F0">val</FONT></B> f :<B><FONT COLOR="#228B22"> t * int -&gt; int
</FONT></B><B><FONT COLOR="#0000FF">end</FONT></B>
<B><FONT COLOR="#0000FF">structure</FONT></B> S : S = <B><FONT COLOR="#0000FF">struct</FONT></B>
  <B><FONT COLOR="#A020F0">datatype</FONT></B><B><FONT COLOR="#228B22"> t </FONT></B>=<B><FONT COLOR="#228B22"> <FONT COLOR="#B8860B">T</FONT> <B><FONT COLOR="#A020F0">of</FONT></B> int
  </FONT></B><B><FONT COLOR="#A020F0">val</FONT></B> x :<B><FONT COLOR="#228B22"> t </FONT></B>=<B><FONT COLOR="#228B22"></FONT></B> T <B><FONT COLOR="#5F9EA0">0</FONT></B>
  <B><FONT COLOR="#A020F0">fun</FONT></B> f (T x, i :<B><FONT COLOR="#228B22"> int</FONT></B>) :<B><FONT COLOR="#228B22"> int </FONT></B>=<B><FONT COLOR="#228B22"></FONT></B> x + y
  <B><FONT COLOR="#A020F0">fun</FONT></B> <B><FONT COLOR="#228B22">'a</FONT></B> id (x:<B><FONT COLOR="#228B22"> 'a</FONT></B>) :<B><FONT COLOR="#228B22"> 'a </FONT></B>=<B><FONT COLOR="#228B22"></FONT></B> x
<B><FONT COLOR="#0000FF">end</FONT></B>
</PRE>
 
</p>
</li>

    </ul>


<h2 id="head-e5a1ef08918738578c7f1b88920c73a60499c69d">Install and use</h2>

    <ul>

    <li>
<p>
 Version 1.6.3 of <a class="external" href="http://people.ssh.com/mtr/genscript"><img src="moin-www.png" alt="[WWW]" height="11" width="11">GNU Enscript</a> 
</p>
</li>

            <ul>

            <li>
<p>
 Copy all files to <tt>/usr/share/enscript/hl/</tt> or <tt>.enscript/</tt> in your home directory. 
</p>
</li>
            <li>
<p>
 Invoke <tt>enscript</tt> with <tt>--highlight=sml_simple</tt> (or <tt>--highlight=sml_verbose</tt> or <tt>--highlight=sml_fancy</tt> or <tt>--highlight=sml_gaudy</tt>). 
</p>
</li>

            </ul>


    <li>
<p>
 Version 1.6.1 of <a class="external" href="http://people.ssh.com/mtr/genscript"><img src="moin-www.png" alt="[WWW]" height="11" width="11">GNU Enscript</a> 
</p>
</li>

            <ul>

            <li>
<p>
 Append <a href = "http://mlton.org/cgi-bin/viewsvn.cgi/mlton/tags/on-MLTONWIKIVERSION-release/ide/enscript/sml_all.st?view=markup"><img src="moin-www.png" alt="[WWW]" height="11" width="11">sml_all.st</a> to <tt>/usr/share/enscript/enscript.st</tt> 
</p>
</li>
            <li>
<p>
 Invoke <tt>enscript</tt> with <tt>--pretty-print=sml_simple</tt> (or <tt>--pretty-print=sml_verbose</tt> or <tt>--pretty-print=sml_fancy</tt> or <tt>--pretty-print=sml_gaudy</tt>). 
</p>
</li>

            </ul>



    </ul>


<p>
This <a href="WebSite">WebSite</a> uses <tt>sml_fancy</tt> to pretty-print <a href="StandardML">Standard ML</a> source code.  Comments and suggestions should be directed to <a href="MatthewFluet">MatthewFluet</a>. 
</p>
</div>



<p>
<hr>
Last edited on 2006-11-02 17:41:43 by <span title="76.16.241.4"><a href="MatthewFluet">MatthewFluet</a></span>.
</body></html>