/usr/share/mozart/doc/macro/node3.html is in mozart-doc 1.4.0-8ubuntu1.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 | <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD><TITLE>1.2 Macro Module</TITLE><LINK href="ozdoc.css" rel="stylesheet" type="text/css"></HEAD><BODY><TABLE align="center" border="0" cellpadding="6" cellspacing="6" class="nav"><TR bgcolor="#DDDDDD"><TD><A href="node2.html#section.call.and.define"><< Prev</A></TD><TD><A href="node1.html">- Up -</A></TD><TD><A href="node4.html#section.backquote.macro">Next >></A></TD></TR></TABLE><DIV id="section.macro.module"><H2><A name="section.macro.module">1.2 <CODE>Macro</CODE> Module</A></H2><P></P><DL><DT><CODE>macroExpand</CODE></DT><DD><BLOCKQUOTE class="synopsis"><P></P><BLOCKQUOTE class="code"><CODE>{Macro<SPAN class="keyword">.</SPAN>macroExpand </CODE><CODE>+<I>X</I></CODE><CODE> </CODE><CODE>+<I>Env</I></CODE><CODE> </CODE><CODE>?<I>Y</I></CODE><CODE>}</CODE></BLOCKQUOTE><P></P></BLOCKQUOTE></DD><DD><P><CODE>X</CODE> is a term representing Oz code using <EM>Syntax Tree Format</EM>. This performs full macro expansion on <CODE>X</CODE> with respect to macro environment <CODE>Env</CODE> and returns <CODE>Y</CODE> which is guaranteed to no longer contain any macro invocation. A macro environment maps macro names to expanders. <CODE>Env</CODE> may also be <CODE><SPAN class="keyword">unit</SPAN></CODE> in which case the global macro environment is used which contains all the macros registered using <CODE>Macro<SPAN class="keyword">.</SPAN>defmacro</CODE>.</P></DD><DT><CODE>defmacro</CODE></DT><DD><BLOCKQUOTE class="synopsis"><P></P><BLOCKQUOTE class="code"><CODE>{Macro<SPAN class="keyword">.</SPAN>defmacro </CODE><CODE>+<I>A</I></CODE><CODE> </CODE><CODE>+<I>F</I></CODE><CODE>}</CODE></BLOCKQUOTE><P></P></BLOCKQUOTE></DD><DD><P><CODE>A</CODE> should be an atom. A new global macro is defined which is invoked using atom <CODE>A</CODE> and implemented using macro expander <CODE>F</CODE>.</P></DD><DT><CODE>makeVar</CODE></DT><DT><CODE>makeNamedVar</CODE></DT><DD><BLOCKQUOTE class="synopsis"><P></P><BLOCKQUOTE class="code"><CODE>{Macro<SPAN class="keyword">.</SPAN>makeVar </CODE><CODE>?<I>X</I></CODE><CODE>}</CODE></BLOCKQUOTE><P></P></BLOCKQUOTE></DD><DD><BLOCKQUOTE class="synopsis"><P></P><BLOCKQUOTE class="code"><CODE>{Macro<SPAN class="keyword">.</SPAN>makeNamedVar </CODE><CODE>+<I>A</I></CODE><CODE> </CODE><CODE>?<I>X</I></CODE><CODE>}</CODE></BLOCKQUOTE><P></P></BLOCKQUOTE></DD><DD><P>This is very useful to create on the fly new representations of variables that are guaranteed not to conflict with those in user code. With <CODE>Macro<SPAN class="keyword">.</SPAN>makeNamedVar</CODE>, you supply an atom that provides the variable with a more meaningful name. This can be helpful for debugging. For example: </P><BLOCKQUOTE class="code"><CODE>X = {Macro<SPAN class="keyword">.</SPAN>makeNamedVar <SPAN class="string">'Tail'</SPAN>}</CODE></BLOCKQUOTE><P> creates a new variable representation, guaranteed to be distinct from any other variable representation, and whose print name is <CODE>Tail</CODE>.</P></DD><DT><CODE>sequenceToList</CODE></DT><DD><BLOCKQUOTE class="synopsis"><P></P><BLOCKQUOTE class="code"><CODE>{Macro<SPAN class="keyword">.</SPAN>sequenceToList </CODE><CODE>+<I>X</I></CODE><CODE> </CODE><CODE>?<I>L</I></CODE><CODE>}</CODE></BLOCKQUOTE><P></P></BLOCKQUOTE></DD><DD><P>Converts the syntactic representation of a sequence to a list</P></DD><DT><CODE>listToSequence</CODE></DT><DD><BLOCKQUOTE class="synopsis"><P></P><BLOCKQUOTE class="code"><CODE>{Macro<SPAN class="keyword">.</SPAN>listToSequence </CODE><CODE>+<I>L</I></CODE><CODE> </CODE><CODE>?<I>X</I></CODE><CODE>}</CODE></BLOCKQUOTE><P></P></BLOCKQUOTE></DD><DD><P>Converts a list to the syntactic representation of a sequence</P></DD></DL><P></P></DIV><TABLE align="center" border="0" cellpadding="6" cellspacing="6" class="nav"><TR bgcolor="#DDDDDD"><TD><A href="node2.html#section.call.and.define"><< Prev</A></TD><TD><A href="node1.html">- Up -</A></TD><TD><A href="node4.html#section.backquote.macro">Next >></A></TD></TR></TABLE><HR><ADDRESS><A href="http://www.ps.uni-sb.de/~duchier/">Denys Duchier</A><BR><SPAN class="version">Version 1.4.0 (20110908185330)</SPAN></ADDRESS></BODY></HTML>
|