diff options
author | 2015-03-05 14:58:34 -0500 | |
---|---|---|
committer | 2015-03-05 14:58:34 -0500 | |
commit | 34ad77c2c2e35155af59f8637a6bda552112781e (patch) | |
tree | 8e3016065a4a4301326e478951f1247c76da6f0a /doc/manual.tex | |
parent | fbbec2e6b041b89827bafaf1f2f82f42ab8ea508 (diff) |
Document new infix operators
Diffstat (limited to 'doc/manual.tex')
-rw-r--r-- | doc/manual.tex | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/doc/manual.tex b/doc/manual.tex index bcdb7f35..7342915c 100644 --- a/doc/manual.tex +++ b/doc/manual.tex @@ -632,6 +632,8 @@ A signature item $\mt{table} \; x : c$ is shorthand for $\mt{val} \; x : \mt{Bas It is possible to write a $\mt{let}$ expression with its constituents in reverse order, along the lines of Haskell's \cd{where}. An expression $\mt{let} \; e \; \mt{where} \; ed^* \; \mt{end}$ desugars to $\mt{let} \; ed^* \; \mt{in} \; e \; \mt{end}$. +Ur/Web also includes a few more infix operators: $f \; \texttt{<|} \; x$ desugars to $f \; x$, $x \; \texttt{|>} \; f$ to $f \; x$, $f \; \texttt{<{}<{}<} \; g$ to $\mt{Top}.\mt{compose} \; f \; g$, and $g \; \texttt{>{}>{}>} \; f$ to $\mt{Top}.\mt{compose} \; f \; g$. (The latter two are doing function composition in the usual way.) Furthermore, any identifier may be changed into an infix operator by placing it between backticks, e.g. a silly way to do addition is $x \; \texttt{`}\mt{plus}\texttt{`} \; y$ instead of $x + y$. + \section{Static Semantics} |