Skip to content

Commit 371944f

Browse files
Solve name clash with f
1 parent f185b6d commit 371944f

5 files changed

Lines changed: 41 additions & 8 deletions

File tree

test/generators/cases/oxcaml.mli

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,5 +27,5 @@ val add_opt_strict : bool -> int -> int -> int [@@zero_alloc opt strict]
2727
(** Like [add] but with a [strict] and [opt] attributes in reverse order.
2828
*)
2929

30-
val[@zero_alloc] f : int -> int
30+
val[@zero_alloc] alt_syntax : int -> int
3131
(** Alternative syntax for zero alloc annotation *)

test/generators/html/Oxcaml.html

Lines changed: 23 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,26 @@
1414
<header class="odoc-preamble">
1515
<h1>Module <code><span>Oxcaml</span></code></h1>
1616
</header>
17-
<div class="odoc-content"><p>Unboxed types have a trailing hash '#'</p>
17+
<div class="odoc-content">
18+
<div class="odoc-spec">
19+
<div class="spec value anchored" id="val-f">
20+
<a href="#val-f" class="anchor"></a>
21+
<code>
22+
<span><span class="keyword">val</span> f :
23+
<span>int <span class="arrow">&#45;&gt;</span></span>
24+
<span>
25+
<span>('a.
26+
<span><span class="type-var">'a</span>
27+
<span class="arrow">&#45;&gt;</span>
28+
</span> <span class="type-var">'a</span>)
29+
</span> <span class="arrow">&#45;&gt;</span>
30+
</span> unit
31+
</span>
32+
</code>
33+
</div>
34+
<div class="spec-doc"><p>Polymorphic arguments require parentheses</p>
35+
</div>
36+
</div><p>Unboxed types have a trailing hash '#'</p>
1837
<div class="odoc-spec">
1938
<div class="spec type anchored" id="type-pt">
2039
<a href="#type-pt" class="anchor"></a>
@@ -151,10 +170,10 @@ <h1>Module <code><span>Oxcaml</span></code></h1>
151170
</div>
152171
</div>
153172
<div class="odoc-spec">
154-
<div class="spec value anchored" id="val-f">
155-
<a href="#val-f" class="anchor"></a>
173+
<div class="spec value anchored" id="val-alt_syntax">
174+
<a href="#val-alt_syntax" class="anchor"></a>
156175
<code>
157-
<span><span class="keyword">val</span> f :
176+
<span><span class="keyword">val</span> alt_syntax :
158177
<span>int <span class="arrow">&#45;&gt;</span></span> int
159178
[@@zero_alloc arity 1]
160179
</span>

test/generators/latex/Oxcaml.tex

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,6 @@
11
\section{Module \ocamlinlinecode{Oxcaml}}\label{Oxcaml}%
2+
\label{Oxcaml--val-f}\ocamlcodefragment{\ocamltag{keyword}{val} f : int \ocamltag{arrow}{$\rightarrow$} ('a.\allowbreak{} \ocamltag{type-var}{'a} \ocamltag{arrow}{$\rightarrow$} \ocamltag{type-var}{'a}) \ocamltag{arrow}{$\rightarrow$} unit}\begin{ocamlindent}Polymorphic arguments require parentheses\end{ocamlindent}%
3+
\medbreak
24
Unboxed types have a trailing hash '\#'
35

46
\label{Oxcaml--type-pt}\ocamlcodefragment{\ocamltag{keyword}{type} pt = \{}\\
@@ -33,7 +35,7 @@ \section{Module \ocamlinlinecode{Oxcaml}}\label{Oxcaml}%
3335
int
3436
[@@zero\_\allowbreak{}alloc strict opt arity 3]}\begin{ocamlindent}Like \ocamlinlinecode{add} but with a \ocamlinlinecode{strict} and \ocamlinlinecode{opt} attributes in reverse order.\end{ocamlindent}%
3537
\medbreak
36-
\label{Oxcaml--val-f}\ocamlcodefragment{\ocamltag{keyword}{val} f : int \ocamltag{arrow}{$\rightarrow$} int [@@zero\_\allowbreak{}alloc arity 1]}\begin{ocamlindent}Alternative syntax for zero alloc annotation\end{ocamlindent}%
38+
\label{Oxcaml--val-alt_syntax}\ocamlcodefragment{\ocamltag{keyword}{val} alt\_\allowbreak{}syntax : int \ocamltag{arrow}{$\rightarrow$} int [@@zero\_\allowbreak{}alloc arity 1]}\begin{ocamlindent}Alternative syntax for zero alloc annotation\end{ocamlindent}%
3739
\medbreak
3840

3941

test/generators/man/Oxcaml.3o

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,13 @@ Oxcaml
1111
.SH Documentation
1212
.sp
1313
.nf
14+
\f[CB]val\fR f : int \f[CB]\->\fR ('a\. \f[CB]'a\fR \f[CB]\->\fR \f[CB]'a\fR) \f[CB]\->\fR unit
15+
.fi
16+
.br
17+
.ti +2
18+
Polymorphic arguments require parentheses
19+
.nf
20+
.sp
1421
.fi
1522
Unboxed types have a trailing hash '#'
1623
.nf
@@ -80,7 +87,7 @@ Like add but with a strict and opt attributes\.
8087
Like add but with a strict and opt attributes in reverse order\.
8188
.nf
8289
.sp
83-
\f[CB]val\fR f : int \f[CB]\->\fR int [@@zero_alloc arity 1]
90+
\f[CB]val\fR alt_syntax : int \f[CB]\->\fR int [@@zero_alloc arity 1]
8491
.fi
8592
.br
8693
.ti +2

test/generators/markdown/Oxcaml.md

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,11 @@
11

22
# Module `Oxcaml`
33

4+
```ocaml
5+
val f : int -> ('a. 'a -> 'a) -> unit
6+
```
7+
Polymorphic arguments require parentheses
8+
49
Unboxed types have a trailing hash '\#'
510

611
```ocaml
@@ -51,6 +56,6 @@ val add_opt_strict :
5156
Like `add` but with a `strict` and `opt` attributes in reverse order.
5257

5358
```ocaml
54-
val f : int -> int [@@zero_alloc arity 1]
59+
val alt_syntax : int -> int [@@zero_alloc arity 1]
5560
```
5661
Alternative syntax for zero alloc annotation

0 commit comments

Comments
 (0)