This file is indexed.

/usr/share/doc/mlton/guide/MLBasisSyntaxAndSemantics 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
<!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>MLBasisSyntaxAndSemantics - 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%;">
      MLBasisSyntaxAndSemantics
    <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">
An <a href="MLBasis">ML Basis</a> (MLB) file should have the <tt>.mlb</tt> suffix and should contain a basis declaration. <h2 id="head-17c7ba7676ad1ad6dd1c4e6b997adcae910262c9">Syntax</h2>
<p>
A basis declaration (<em>basdec</em>) must be one of the following forms. 
</p>

    <ul>

    <li>
<p>
 <tt>basis&nbsp;</tt><em>basid<tt>&nbsp;=&nbsp;</tt>basexp</em>  (<tt>and&nbsp;</tt><em>basid</em><tt>&nbsp;=&nbsp;</tt><em>basexp</em>)* 
</p>
</li>
    <li>
<p>
 <tt>open&nbsp;</tt><em>basid<sub>1</sub></em> ... <em>basid<sub>n</sub></em> 
</p>
</li>
    <li>
<p>
 <tt>local&nbsp;</tt><em>basdec</em><tt>&nbsp;in&nbsp;</tt><em>basdec</em><tt>&nbsp;end</tt> 
</p>
</li>
    <li>
<p>
 <em>basdec</em> [<tt>;</tt>] <em>basdec</em> 
</p>
</li>
    <li>
<p>
 <tt>structure&nbsp;</tt><em>strid</em> [<tt>=&nbsp;</tt><em>strid</em>]  (<tt>and&nbsp;</tt><em>strid</em>[<tt>=&nbsp;</tt><em>strid</em>])* 
</p>
</li>
    <li>
<p>
 <tt>signature&nbsp;</tt><em>sigid</em> [<tt>=&nbsp;</tt><em>sigid</em>]  (<tt>and&nbsp;</tt><em>sigid</em> [<tt>=&nbsp;</tt><em>sigid</em>])* 
</p>
</li>
    <li>
<p>
 <tt>functor&nbsp;</tt><em>funid</em> [<tt>=&nbsp;</tt><em>funid</em>]  (<tt>and&nbsp;</tt><em>funid</em> [<tt>=&nbsp;</tt><em>funid</em>])* 
</p>
</li>
    <li>
<p>
 <em>path</em><tt>.sml</tt>, <em>path</em><tt>.sig</tt>, or <em>path</em><tt>.fun</tt> 
</p>
</li>
    <li>
<p>
 <em>path</em><tt>.mlb</tt> 
</p>
</li>
    <li>
<p>
 <tt>ann&nbsp;</tt><tt>"</tt><em>ann</em><tt>"</tt><tt>&nbsp;in&nbsp;</tt><em>basdec</em><tt>&nbsp;end</tt> 
</p>
</li>

    </ul>


<p>
A basis expression (<em>basexp</em>) must be of one the following forms. 
</p>

    <ul>

    <li>
<p>
 <tt>bas&nbsp;</tt><em>basdec</em><tt>&nbsp;end</tt> 
</p>
</li>
    <li>
<p>
 <em>basid</em> 
</p>
</li>
    <li>
<p>
 <tt>let&nbsp;</tt><em>basdec</em><tt>&nbsp;in&nbsp;</tt><em>basexp</em><tt>&nbsp;end</tt> 
</p>
</li>

    </ul>


<p>
Nested SML-style comments (enclosed with <tt>(*</tt> and <tt>*)</tt>) are ignored (but <a href="LineDirective">LineDirective</a>s are recognized). 
</p>
<p>
Paths can be relative or absolute.  Relative paths are relative to the directory containing the MLB file.  Paths may include path variables and are expanded according to a <a href="MLBasisPathMap">path map</a>.  Unquoted paths may include alpha-numeric characters and the symbols "<tt>-</tt>" and "<tt>_</tt>", along with the arc separator "<tt>/</tt>" and extension separator "<tt>.</tt>".  More complicated paths, including paths with spaces, may be included by quoting the path with <tt>"</tt>.  A quoted path is lexed as an SML string constant. 
</p>
<p>
<a href="MLBasisAnnotations">Annotations</a> allow a library author to control options that affect the elaboration of SML source files. 
</p>
<h2 id="head-fe03c3515833357d89e7094df960e757cae3bc1d">Semantics</h2>
<p>
There is a <a href="http://mlton.org/pages/MLBasis/attachments/mlb-formal.pdf"><img src="moin-www.png" alt="[WWW]" height="11" width="11">formal semantics</a> for ML Basis files in the style of the <a href="DefinitionOfStandardML">Definition</a>. Here, we give an informal explanation. 
</p>
<p>
An SML structure is a collection of types, values, and other structures.  Similarly, a basis is a collection, but of more kinds of objects: types, values, structures, fixities, signatures, functors, and other bases.  
</p>
<p>
A basis declaration denotes a basis.  A structure, signature, or functor declaration denotes a basis containing the corresponding module.  Sequencing of basis declarations merges bases, with later definitions taking precedence over earlier ones, just like sequencing of SML declarations.  Local declarations provide name hiding, just like SML local declarations.  A reference to an SML source file causes the file to be elaborated in the basis extant at the point of reference.  A reference to an MLB file causes the basis denoted by that MLB file to be imported -- the basis at the point of reference does <em>not</em> affect the imported basis. 
</p>
<p>
Basis expressions and basis identifiers allow binding a basis to a name. 
</p>
<p>
An MLB file is elaborated starting in an empty basis.  Each MLB file is elaborated and evaluated only once, with the result being cached. Subsequent references use the cached value.  Thus, any observable effects due to evaluation are not duplicated if the MLB file is referred to multiple times. 
</p>
</div>



<p>
<hr>
Last edited on 2007-08-23 04:22:13 by <span title="c-71-57-91-146.hsd1.il.comcast.net"><a href="MatthewFluet">MatthewFluet</a></span>.
</body></html>