浏览代码

added line breaks to verbatim blocks in the manual to help emacs highlighting

Dennis Furey 12 年之前
父节点
当前提交
7ca8079fb4
共有 1 个文件被更改,包括 56 次插入28 次删除
  1. 56 28
      doc/manual.tex

+ 56 - 28
doc/manual.tex

@@ -8645,7 +8645,8 @@ nevertheless gives an indication of the sizes of the fields. The next
 example demonstrates a record instance recognizer.
 example demonstrates a record instance recognizer.
 \begin{verbatim}
 \begin{verbatim}
 $ fun rlib --main="_myrec%I an_instance" --cast %b
 $ fun rlib --main="_myrec%I an_instance" --cast %b
-true\end{verbatim}%$
+true
+\end{verbatim}%$
 When a type expression given by a symbolic name is used in
 When a type expression given by a symbolic name is used in
 conjunction with other type constructors or functionals such as
 conjunction with other type constructors or functionals such as
 \verb|I| and \verb|P|, the symbolic name appears on the left side of
 \verb|I| and \verb|P|, the symbolic name appears on the left side of
@@ -8677,7 +8678,8 @@ goody_bag[
    cost:            125.00,
    cost:            125.00,
    celebrity_rank:  `B,
    celebrity_rank:  `B,
    occasion:        'Academy Awards',
    occasion:        'Academy Awards',
-   hypoallergenic:  true]\end{verbatim}
+   hypoallergenic:  true]
+\end{verbatim}
 \caption{Typed records annotate some or all of the fields with a type expression.}
 \caption{Typed records annotate some or all of the fields with a type expression.}
 \label{tcr}
 \label{tcr}
 \end{Listing}
 \end{Listing}
@@ -8720,7 +8722,8 @@ goody_bag[
    cost: 1.250000e+02,
    cost: 1.250000e+02,
    celebrity_rank: `B,
    celebrity_rank: `B,
    occasion: 'Academy Awards',
    occasion: 'Academy Awards',
-   hypoallergenic: true]\end{verbatim}
+   hypoallergenic: true]
+\end{verbatim}
 
 
 \subsubsection{Type checking}
 \subsubsection{Type checking}
 \index{type checking!in records}
 \index{type checking!in records}
@@ -8734,7 +8737,8 @@ false
 $ fun bags --m="_goody_bag%I goody_bag[cost: 'free']" -c %b
 $ fun bags --m="_goody_bag%I goody_bag[cost: 'free']" -c %b
 false
 false
 $ fun bags --m="_goody_bag%I goody_bag[cost: 0.0]" --c %b
 $ fun bags --m="_goody_bag%I goody_bag[cost: 0.0]" --c %b
-true\end{verbatim}%$
+true
+\end{verbatim}%$
 This convention applies also to the type validator operator, \verb|V|,
 This convention applies also to the type validator operator, \verb|V|,
 when used in conjunction with typed records (page~\pageref{vlad}), and
 when used in conjunction with typed records (page~\pageref{vlad}), and
 to the \verb|--cast| command line option, which will decline to
 to the \verb|--cast| command line option, which will decline to
@@ -8742,7 +8746,8 @@ display a badly typed record instance as such.
 \begin{verbatim}
 \begin{verbatim}
 $ fun bags --m="goody_bag[cost: 'free']" --c _goody_bag
 $ fun bags --m="goody_bag[cost: 'free']" --c _goody_bag
 fun: writing `core'
 fun: writing `core'
-warning: can't display as indicated type; core dumped\end{verbatim}%$
+warning: can't display as indicated type; core dumped
+\end{verbatim}%$
 
 
 \subsubsection{Default values}
 \subsubsection{Default values}
 \index{records!default values}
 \index{records!default values}
@@ -8959,7 +8964,8 @@ add    = point$[x: plus+ ~x~~,y: plus+ ~y~~]
 rotate = point$[r: ~&r.r,t: plus+ ~/&l &r.t]
 rotate = point$[r: ~&r.r,t: plus+ ~/&l &r.t]
 scale  = point$[r: times+ ~/&l &r.r,t: ~&r.t]
 scale  = point$[r: times+ ~/&l &r.r,t: ~&r.t]
 invert = scale/-1.
 invert = scale/-1.
-orbit  = scale/2.1+ add^/invert rotate/0.5\end{verbatim}%$
+orbit  = scale/2.1+ add^/invert rotate/0.5
+\end{verbatim}%$
 \caption{polar and retangular coordinates automatically maintained}
 \caption{polar and retangular coordinates automatically maintained}
 \label{plib}
 \label{plib}
 \end{Listing}
 \end{Listing}
@@ -9652,7 +9658,8 @@ $ fun --m="500%cnDmi&" --c %cnDm
    '{V}gamO$`': 244%cOi&^: <218%cOi&^: <24^: <>>,2^: <>>,
    '{V}gamO$`': 244%cOi&^: <218%cOi&^: <24^: <>>,2^: <>>,
    '?xtyv9kN#/AJ': 2^: <>,
    '?xtyv9kN#/AJ': 2^: <>,
    'P9tPxo[_': 220%cOi&^: <~&V(),0^: <>,4^: <>>,
    'P9tPxo[_': 220%cOi&^: <~&V(),0^: <>,4^: <>>,
-   '-/.X-D+g`Y': `P^: <0^: <>>>\end{verbatim}
+   '-/.X-D+g`Y': `P^: <0^: <>>>
+\end{verbatim}
 See page~\pageref{osem} for more examples.
 See page~\pageref{osem} for more examples.
 
 
 \paragraph{Limitations}
 \paragraph{Limitations}
@@ -10727,11 +10734,13 @@ optimized where possible. For example, the three functions in the
 above sequence can be reduced to two.
 above sequence can be reduced to two.
 \begin{verbatim}
 \begin{verbatim}
 $ fun --main="-+~&x,~&h,~&t+-" --decompile
 $ fun --main="-+~&x,~&h,~&t+-" --decompile
-main = compose(reverse,field(0,(0,&)))\end{verbatim}%$
+main = compose(reverse,field(0,(0,&)))
+\end{verbatim}%$
 Optimizations may also affect the ``eagerness'' of a composition.
 Optimizations may also affect the ``eagerness'' of a composition.
 \begin{verbatim}
 \begin{verbatim}
 $ fun --m="-+constant'abc',~&t,~&h,~&x+-" --d 
 $ fun --m="-+constant'abc',~&t,~&h,~&x+-" --d 
-main = constant 'abc'\end{verbatim}%$
+main = constant 'abc'
+\end{verbatim}%$
 The constant function returns a fixed value regardless of its
 The constant function returns a fixed value regardless of its
 argument, so there is no need for the remaining functions in the
 argument, so there is no need for the remaining functions in the
 composition to be retained.
 composition to be retained.
@@ -10902,7 +10911,8 @@ $ fun --m="<math..sin,math..cos,math..tan>" --c %fL
 <
 <
    library('math','sin'),
    library('math','sin'),
    library('math','cos'),
    library('math','cos'),
-   library('math','tan')>\end{verbatim}%$
+   library('math','tan')>
+\end{verbatim}%$
 The function returning the list of the results of these
 The function returning the list of the results of these
 three functions is expressed with a suffix on the opening list
 three functions is expressed with a suffix on the opening list
 delimiter.
 delimiter.
@@ -10912,7 +10922,8 @@ couple(
    library('math','sin'),
    library('math','sin'),
    couple(
    couple(
       library('math','cos'),
       library('math','cos'),
-      couple(library('math','tan'),constant 0)))\end{verbatim}%$
+      couple(library('math','tan'),constant 0)))
+\end{verbatim}%$
 This function constructs a structure following the representation
 This function constructs a structure following the representation
 shown in Figure~\ref{rol}. To evaluate the function, we can apply it
 shown in Figure~\ref{rol}. To evaluate the function, we can apply it
 to the argument of 1 radian.
 to the argument of 1 radian.
@@ -10992,7 +11003,8 @@ wrapper = # allows high precision for intermediate calculations
 
 
 rad_to_deg = # converts radians to degrees with high precision
 rad_to_deg = # converts radians to degrees with high precision
 
 
-wrapper mp..mul/1.8E2+ mp..div^/~& mp..pi+ mp..prec\end{verbatim}
+wrapper mp..mul/1.8E2+ mp..div^/~& mp..pi+ mp..prec
+\end{verbatim}
 \caption{when to use a higher order composition}
 \caption{when to use a higher order composition}
 \label{promo}
 \label{promo}
 \end{Listing}
 \end{Listing}
@@ -11033,7 +11045,8 @@ The code in Listing~\ref{promo}, stored in a file named
 $ fun promo.fun --archive
 $ fun promo.fun --archive
 fun: writing `promo.avm'
 fun: writing `promo.avm'
 $ fun promo --m="rad_to_deg 2." --c %e
 $ fun promo --m="rad_to_deg 2." --c %e
-1.145916e+02\end{verbatim}
+1.145916e+02
+\end{verbatim}
 
 
 A further point of interest in this example is the use of \verb|-??-|
 A further point of interest in this example is the use of \verb|-??-|
 \index{cumulative conditionals}
 \index{cumulative conditionals}
@@ -11045,12 +11058,14 @@ instance recognizers and the functions are meant to be type conversion
 functions.
 functions.
 \begin{verbatim}
 \begin{verbatim}
 $ fun promo --m="retype<%nI: mpfr..nat2mp> 153" --c %E
 $ fun promo --m="retype<%nI: mpfr..nat2mp> 153" --c %E
-1.530E+02\end{verbatim}%$
+1.530E+02
+\end{verbatim}%$
 A default function that raises an exception is supplied automatically
 A default function that raises an exception is supplied automatically
 because it is never meant to be reached.
 because it is never meant to be reached.
 \begin{verbatim}
 \begin{verbatim}
 $ fun promo --m="retype<%nI: mpfr..nat2mp> 'foo'" --c %E
 $ fun promo --m="retype<%nI: mpfr..nat2mp> 'foo'" --c %E
-fun:command-line: unrecognized type conversion\end{verbatim}%$
+fun:command-line: unrecognized type conversion
+\end{verbatim}%$
 The content of the diagnostic message is the only feature specific to
 The content of the diagnostic message is the only feature specific to
 the definition of \verb|retype| as a type converter.
 the definition of \verb|retype| as a type converter.
 
 
@@ -11069,7 +11084,8 @@ outfix operators
  [..]   record delimiters
  [..]   record delimiters
  <..>   list delimiters
  <..>   list delimiters
  {..}   specifies sets as sorted lists with duplicates purged
  {..}   specifies sets as sorted lists with duplicates purged
- (..)   tuple delimiters\end{verbatim}
+ (..)   tuple delimiters
+\end{verbatim}
 \caption{output from the command \texttt{\$ fun --help outfix}}
 \caption{output from the command \texttt{\$ fun --help outfix}}
 \label{helpout}
 \label{helpout}
 \end{Listing}
 \end{Listing}
@@ -11277,7 +11293,8 @@ section to concatenate each item in a list of strings with an
 \verb|'x'|.
 \verb|'x'|.
 \begin{verbatim}
 \begin{verbatim}
 $ fun --m="--\*'x' <'a','b','c'>" --c
 $ fun --m="--\*'x' <'a','b','c'>" --c
-<'ax','bx','cx'>\end{verbatim}%$
+<'ax','bx','cx'>
+\end{verbatim}%$
 
 
 \subsection{Suffixes}
 \subsection{Suffixes}
 
 
@@ -11334,13 +11351,15 @@ $ fun flo --m="fleq/;0. <-2.,-1.,0.,1.,2.>" --c %eL
 applying to both sides of a pair. Note the order of the suffixes.
 applying to both sides of a pair. Note the order of the suffixes.
 \begin{verbatim}
 \begin{verbatim}
 $ fun --m="--\*=$'x' (<'a','b'>,<'c','d'>)" --c
 $ fun --m="--\*=$'x' (<'a','b'>,<'c','d'>)" --c
-('axbx','cxdx')\end{verbatim}
+('axbx','cxdx')
+\end{verbatim}
 \item This example shows a naive algorithm for constructing a series of
 \item This example shows a naive algorithm for constructing a series of
 powers of two.
 powers of two.
 \index{product@\texttt{product}!natural}
 \index{product@\texttt{product}!natural}
 \begin{verbatim}
 \begin{verbatim}
 $ fun --m="product/|2 <1,1,1,1,1>" --c %nL
 $ fun --m="product/|2 <1,1,1,1,1>" --c %nL
-<1,2,4,8,16>\end{verbatim}%$
+<1,2,4,8,16>
+\end{verbatim}%$
 \end{itemize}
 \end{itemize}
 \label{tsuf}
 \label{tsuf}
 The last  example works because \verb.f/|n <a,b,c,d>. is equivalent to
 The last  example works because \verb.f/|n <a,b,c,d>. is equivalent to
@@ -11359,7 +11378,8 @@ is always recourse to decompilation.
 $ fun --m="--\*=$'x'" --decompile
 $ fun --m="--\*=$'x'" --decompile
 main = fan compose(
 main = fan compose(
    reduce(cat,0),
    reduce(cat,0),
-   map compose(cat,couple(field &,constant 'x')))\end{verbatim}%$
+   map compose(cat,couple(field &,constant 'x')))
+\end{verbatim}%$
 
 
 \section{Pointer operations}
 \section{Pointer operations}
 
 
@@ -22964,7 +22984,8 @@ line option.
 \begin{verbatim}
 \begin{verbatim}
 $ fun flo cli ytest.fun --show --trace
 $ fun flo cli ytest.fun --show --trace
 opening yorick
 opening yorick
-waiting for 62 32\end{verbatim}$\vdots$\begin{verbatim}
+waiting for 62 32
+\end{verbatim}$\vdots$\begin{verbatim}
 <- q 113
 <- q 113
 <- u 117
 <- u 117
 <- i 105
 <- i 105
@@ -23297,8 +23318,10 @@ interactive help,
 $ fun --pointers ./kde --help pointers,2
 $ fun --pointers ./kde --help pointers,2
 
 
 pointer stack operators of arity 2  (*pseudo-pointer)
 pointer stack operators of arity 2  (*pseudo-pointer)
------------------------------------------------------\end{verbatim}$\vdots$
-\begin{verbatim} * K18  binary subset combinator\end{verbatim}$\vdots$%$
+-----------------------------------------------------
+\end{verbatim}$\vdots$
+\begin{verbatim} * K18  binary subset combinator
+\end{verbatim}$\vdots$%$
 
 
 \noindent
 \noindent
 and it has the specified semantics.
 and it has the specified semantics.
@@ -24820,7 +24843,8 @@ and the second subtree is empty.
       ~&V(),
       ~&V(),
       ^:<> token[
       ^:<> token[
          lexeme: 's',
          lexeme: 's',
-         location: (2,9)]>)\end{verbatim}
+         location: (2,9)]>)
+\end{verbatim}
 \caption{parse tree for a prefix operator \texttt{\%=s}, showing an empty first
 \caption{parse tree for a prefix operator \texttt{\%=s}, showing an empty first
 subexpression}
 subexpression}
 \label{rfix}
 \label{rfix}
@@ -24838,7 +24862,8 @@ subexpression}
       ^:<> token[
       ^:<> token[
          lexeme: 's',
          lexeme: 's',
          location: (2,7)],
          location: (2,7)],
-      ~&V()>)\end{verbatim}
+      ~&V()>)
+\end{verbatim}
 \caption{parse tree for a postfix operator \texttt{s\%=}, showing an empty second
 \caption{parse tree for a postfix operator \texttt{s\%=}, showing an empty second
 subexpression}
 subexpression}
 \label{ofix}
 \label{ofix}
@@ -24859,7 +24884,8 @@ subexpression}
          location: (2,7)],
          location: (2,7)],
       ^:<> token[
       ^:<> token[
          lexeme: 't',
          lexeme: 't',
-         location: (2,10)]>)\end{verbatim}
+         location: (2,10)]>)
+\end{verbatim}
 \caption{parse tree for an infix operator \texttt{s\%=t}, with two
 \caption{parse tree for an infix operator \texttt{s\%=t}, with two
 non-empty subexpressions}
 non-empty subexpressions}
 \label{ifix}
 \label{ifix}
@@ -24919,7 +24945,8 @@ in Listing~\ref{agca}.
                         ^:<> token[
                         ^:<> token[
                            lexeme: 'c',
                            lexeme: 'c',
                            location: (2,12)]>)>),
                            location: (2,12)]>)>),
-            ~&V()>)>)\end{verbatim}
+            ~&V()>)>)
+\end{verbatim}
 \caption{the parse tree for \texttt{\{a,b,c\}}, showing commas and aggregate operators}
 \caption{the parse tree for \texttt{\{a,b,c\}}, showing commas and aggregate operators}
 \label{agca}
 \label{agca}
 \end{Listing}
 \end{Listing}
@@ -24991,7 +25018,8 @@ log =
             ^T/~&yyNNCT ((* :/` ) "d")--+ ~&yzPzNCC,
             ^T/~&yyNNCT ((* :/` ) "d")--+ ~&yzPzNCC,
             --<''>+ --((* :/` ) "d")+ ~&iNNCT),
             --<''>+ --((* :/` ) "d")+ ~&iNNCT),
          'dependences: '--+ mat` + ~&s+ *^0 :^\~&vL ~&d.filename+-+-,
          'dependences: '--+ mat` + ~&s+ *^0 :^\~&vL ~&d.filename+-+-,
-   help: 'list source file dependences in executables and libraries']\end{verbatim}
+   help: 'list source file dependences in executables and libraries']
+\end{verbatim}
 \caption{command line option to add source dependence information to output files}
 \caption{command line option to add source dependence information to output files}
 \label{log}
 \label{log}
 \end{Listing}
 \end{Listing}