Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Fetching contributors…

Cannot retrieve contributors at this time

667 lines (666 sloc) 91.339 kB
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"
"http://www.w3.org/TR/REC-html40/loose.dtd">
<html>
<head>
<title>Failing tests, ocp-indent version 1.2.1 (2013-06-11)</title>
<meta http-equiv="Content-type" content="text/html; charset=utf-8" />
<style>
TABLE { border-collapse: collapse; border-spacing: 0px; margin: auto; }
H2 { margin-top: 5ex; text-align: center; padding: 1ex;
background-color: orange; }
TR,TD,PRE { padding: 0; margin: 0; }
TD.linenum { vertical-align: top; font-family: monospace;
padding-right:2px; text-align: right }
TD.correct { background-color: #EEE; border: 1px solid white; }
TD.different { background-color: orange; border: 1px solid white; }
</style>
</head>
<body>
<h1>Failing tests, ocp-indent version 1.2.1 (2013-06-11)</h1>
<div>
<h2>Differences in js-args.ml</h2>
<table>
<tr><th><th>Expected<th>Ocp-indent output</tr>
<tr><td class="linenum">0</td><td class="correct"><pre>let () =</pre></td><td class="correct"><pre>let () =</pre></td></tr>
<tr><td class="linenum">1</td><td class="correct"><pre> foo.bar <-</pre></td><td class="correct"><pre> foo.bar <-</pre></td></tr>
<tr><td class="linenum">2</td><td class="correct"><pre> f x</pre></td><td class="correct"><pre> f x</pre></td></tr>
<tr><td class="linenum">3</td><td class="correct"><pre> y z</pre></td><td class="correct"><pre> y z</pre></td></tr>
<tr><td class="linenum">4</td><td class="correct"><pre></pre></td><td class="correct"><pre></pre></td></tr>
<tr><td class="linenum">5</td><td class="correct"><pre>(* yminsky *)</pre></td><td class="correct"><pre>(* yminsky *)</pre></td></tr>
<tr><td class="linenum">6</td><td class="correct"><pre>let should_check_can_sell_and_marking regulatory_regime =</pre></td><td class="correct"><pre>let should_check_can_sell_and_marking regulatory_regime =</pre></td></tr>
<tr><td class="linenum">7</td><td class="correct"><pre> match z with</pre></td><td class="correct"><pre> match z with</pre></td></tr>
<tr><td class="linenum">8</td><td class="correct"><pre> | `foo</pre></td><td class="correct"><pre> | `foo</pre></td></tr>
<tr><td class="linenum">9</td><td class="correct"><pre> -> some_function</pre></td><td class="correct"><pre> -> some_function</pre></td></tr>
<tr><td class="linenum">10</td><td class="correct"><pre> argument</pre></td><td class="correct"><pre> argument</pre></td></tr>
<tr><td class="linenum">11</td><td class="correct"><pre>(* pszilagyi: The above typically occurs in a multi-pattern match clause, so the</pre></td><td class="correct"><pre>(* pszilagyi: The above typically occurs in a multi-pattern match clause, so the</pre></td></tr>
<tr><td class="linenum">12</td><td class="correct"><pre> clause expression is on a line by itself. This is the more typical way a</pre></td><td class="correct"><pre> clause expression is on a line by itself. This is the more typical way a</pre></td></tr>
<tr><td class="linenum">13</td><td class="correct"><pre> long single-pattern match clause would be written: *)</pre></td><td class="correct"><pre> long single-pattern match clause would be written: *)</pre></td></tr>
<tr><td class="linenum">14</td><td class="correct"><pre>let should_check_can_sell_and_marking regulatory_regime =</pre></td><td class="correct"><pre>let should_check_can_sell_and_marking regulatory_regime =</pre></td></tr>
<tr><td class="linenum">15</td><td class="correct"><pre> match z with</pre></td><td class="correct"><pre> match z with</pre></td></tr>
<tr><td class="linenum">16</td><td class="correct"><pre> | `foo -></pre></td><td class="correct"><pre> | `foo -></pre></td></tr>
<tr><td class="linenum">17</td><td class="correct"><pre> some_function</pre></td><td class="correct"><pre> some_function</pre></td></tr>
<tr><td class="linenum">18</td><td class="correct"><pre> argument</pre></td><td class="correct"><pre> argument</pre></td></tr>
<tr><td class="linenum">19</td><td class="correct"><pre></pre></td><td class="correct"><pre></pre></td></tr>
<tr><td class="linenum">20</td><td class="correct"><pre>let f = fun x -></pre></td><td class="correct"><pre>let f = fun x -></pre></td></tr>
<tr><td class="linenum">21</td><td class="correct"><pre> ghi</pre></td><td class="correct"><pre> ghi</pre></td></tr>
<tr><td class="linenum">22</td><td class="correct"><pre> x</pre></td><td class="correct"><pre> x</pre></td></tr>
<tr><td class="linenum">23</td><td class="correct"><pre></pre></td><td class="correct"><pre></pre></td></tr>
<tr><td class="linenum">24</td><td class="correct"><pre>(* uncommon *)</pre></td><td class="correct"><pre>(* uncommon *)</pre></td></tr>
<tr><td class="linenum">25</td><td class="correct"><pre>let x =</pre></td><td class="correct"><pre>let x =</pre></td></tr>
<tr><td class="linenum">26</td><td class="correct"><pre> try x with a -> b</pre></td><td class="correct"><pre> try x with a -> b</pre></td></tr>
<tr><td class="linenum">27</td><td class="correct"><pre> | c -> d</pre></td><td class="correct"><pre> | c -> d</pre></td></tr>
<tr><td class="linenum">28</td><td class="correct"><pre>let x =</pre></td><td class="correct"><pre>let x =</pre></td></tr>
<tr><td class="linenum">29</td><td class="correct"><pre> try x</pre></td><td class="correct"><pre> try x</pre></td></tr>
<tr><td class="linenum">30</td><td class="correct"><pre> with a -> b</pre></td><td class="correct"><pre> with a -> b</pre></td></tr>
<tr><td class="linenum">31</td><td class="correct"><pre> | c -> d</pre></td><td class="correct"><pre> | c -> d</pre></td></tr>
<tr><td class="linenum">32</td><td class="correct"><pre>(* common *)</pre></td><td class="correct"><pre>(* common *)</pre></td></tr>
<tr><td class="linenum">33</td><td class="correct"><pre>let x =</pre></td><td class="correct"><pre>let x =</pre></td></tr>
<tr><td class="linenum">34</td><td class="correct"><pre> try x with</pre></td><td class="correct"><pre> try x with</pre></td></tr>
<tr><td class="linenum">35</td><td class="correct"><pre> | a -> b</pre></td><td class="correct"><pre> | a -> b</pre></td></tr>
<tr><td class="linenum">36</td><td class="correct"><pre> | c -> d</pre></td><td class="correct"><pre> | c -> d</pre></td></tr>
<tr><td class="linenum">37</td><td class="correct"><pre>let x = try x with</pre></td><td class="correct"><pre>let x = try x with</pre></td></tr>
<tr><td class="linenum">38</td><td class="correct"><pre> | a -> b</pre></td><td class="correct"><pre> | a -> b</pre></td></tr>
<tr><td class="linenum">39</td><td class="correct"><pre> | c -> d</pre></td><td class="correct"><pre> | c -> d</pre></td></tr>
<tr><td class="linenum">40</td><td class="correct"><pre>let x =</pre></td><td class="correct"><pre>let x =</pre></td></tr>
<tr><td class="linenum">41</td><td class="correct"><pre> try x</pre></td><td class="correct"><pre> try x</pre></td></tr>
<tr><td class="linenum">42</td><td class="correct"><pre> with</pre></td><td class="correct"><pre> with</pre></td></tr>
<tr><td class="linenum">43</td><td class="correct"><pre> | a -> b</pre></td><td class="correct"><pre> | a -> b</pre></td></tr>
<tr><td class="linenum">44</td><td class="correct"><pre> | c -> d</pre></td><td class="correct"><pre> | c -> d</pre></td></tr>
<tr><td class="linenum">45</td><td class="correct"><pre></pre></td><td class="correct"><pre></pre></td></tr>
<tr><td class="linenum">46</td><td class="correct"><pre>let z =</pre></td><td class="correct"><pre>let z =</pre></td></tr>
<tr><td class="linenum">47</td><td class="correct"><pre> some_function</pre></td><td class="correct"><pre> some_function</pre></td></tr>
<tr><td class="linenum">48</td><td class="correct"><pre> argument</pre></td><td class="correct"><pre> argument</pre></td></tr>
<tr><td class="linenum">49</td><td class="correct"><pre></pre></td><td class="correct"><pre></pre></td></tr>
<tr><td class="linenum">50</td><td class="correct"><pre></pre></td><td class="correct"><pre></pre></td></tr>
<tr><td class="linenum">51</td><td class="correct"><pre></pre></td><td class="correct"><pre></pre></td></tr>
<tr><td class="linenum">52</td><td class="correct"><pre>(* dwu *)</pre></td><td class="correct"><pre>(* dwu *)</pre></td></tr>
<tr><td class="linenum">53</td><td class="correct"><pre>let () =</pre></td><td class="correct"><pre>let () =</pre></td></tr>
<tr><td class="linenum">54</td><td class="correct"><pre> f a b ~c:c</pre></td><td class="correct"><pre> f a b ~c:c</pre></td></tr>
<tr><td class="linenum">55</td><td class="correct"><pre> d</pre></td><td class="correct"><pre> d</pre></td></tr>
<tr><td class="linenum">56</td><td class="correct"><pre></pre></td><td class="correct"><pre></pre></td></tr>
<tr><td class="linenum">57</td><td class="correct"><pre>let () =</pre></td><td class="correct"><pre>let () =</pre></td></tr>
<tr><td class="linenum">58</td><td class="correct"><pre> f a b ~c:1.</pre></td><td class="correct"><pre> f a b ~c:1.</pre></td></tr>
<tr><td class="linenum">59</td><td class="correct"><pre> d</pre></td><td class="correct"><pre> d</pre></td></tr>
<tr><td class="linenum">60</td><td class="correct"><pre></pre></td><td class="correct"><pre></pre></td></tr>
<tr><td class="linenum">61</td><td class="correct"><pre>let () =</pre></td><td class="correct"><pre>let () =</pre></td></tr>
<tr><td class="linenum">62</td><td class="correct"><pre> My_module.f a b ~c:c</pre></td><td class="correct"><pre> My_module.f a b ~c:c</pre></td></tr>
<tr><td class="linenum">63</td><td class="correct"><pre> d</pre></td><td class="correct"><pre> d</pre></td></tr>
<tr><td class="linenum">64</td><td class="correct"><pre></pre></td><td class="correct"><pre></pre></td></tr>
<tr><td class="linenum">65</td><td class="correct"><pre>(* This last case is where Tuareg is inconsistent with the others. *)</pre></td><td class="correct"><pre>(* This last case is where Tuareg is inconsistent with the others. *)</pre></td></tr>
<tr><td class="linenum">66</td><td class="correct"><pre>let () =</pre></td><td class="correct"><pre>let () =</pre></td></tr>
<tr><td class="linenum">67</td><td class="correct"><pre> My_module.f a b ~c:1.</pre></td><td class="correct"><pre> My_module.f a b ~c:1.</pre></td></tr>
<tr><td class="linenum">68</td><td class="correct"><pre> d</pre></td><td class="correct"><pre> d</pre></td></tr>
<tr><td class="linenum">69</td><td class="correct"><pre></pre></td><td class="correct"><pre></pre></td></tr>
<tr><td class="linenum">70</td><td class="correct"><pre></pre></td><td class="correct"><pre></pre></td></tr>
<tr><td class="linenum">71</td><td class="correct"><pre></pre></td><td class="correct"><pre></pre></td></tr>
<tr><td class="linenum">72</td><td class="correct"><pre>let () =</pre></td><td class="correct"><pre>let () =</pre></td></tr>
<tr><td class="linenum">73</td><td class="correct"><pre> messages :=</pre></td><td class="correct"><pre> messages :=</pre></td></tr>
<tr><td class="linenum">74</td><td class="correct"><pre> Message_store.create (Session_id.of_string "")</pre></td><td class="correct"><pre> Message_store.create (Session_id.of_string "")</pre></td></tr>
<tr><td class="linenum">75</td><td class="correct"><pre> (* Tuareg indents these lines too far to the left. *)</pre></td><td class="correct"><pre> (* Tuareg indents these lines too far to the left. *)</pre></td></tr>
<tr><td class="linenum">76</td><td class="correct"><pre> "herd-retransmitter"</pre></td><td class="correct"><pre> "herd-retransmitter"</pre></td></tr>
<tr><td class="linenum">77</td><td class="correct"><pre> Message_store.Message_size.Byte</pre></td><td class="correct"><pre> Message_store.Message_size.Byte</pre></td></tr>
<tr><td class="linenum">78</td><td class="correct"><pre></pre></td><td class="correct"><pre></pre></td></tr>
<tr><td class="linenum">79</td><td class="correct"><pre></pre></td><td class="correct"><pre></pre></td></tr>
<tr><td class="linenum">80</td><td class="correct"><pre></pre></td><td class="correct"><pre></pre></td></tr>
<tr><td class="linenum">81</td><td class="correct"><pre>let () =</pre></td><td class="correct"><pre>let () =</pre></td></tr>
<tr><td class="linenum">82</td><td class="correct"><pre> raise (Bug ("foo"</pre></td><td class="correct"><pre> raise (Bug ("foo"</pre></td></tr>
<tr><td class="linenum">83</td><td class="correct"><pre> (* In this and similar cases, we want the subsequent lines to</pre></td><td class="correct"><pre> (* In this and similar cases, we want the subsequent lines to</pre></td></tr>
<tr><td class="linenum">84</td><td class="correct"><pre> align with the first expression. *)</pre></td><td class="correct"><pre> align with the first expression. *)</pre></td></tr>
<tr><td class="linenum">85</td><td class="correct"><pre> ^ "bar"));</pre></td><td class="correct"><pre> ^ "bar"));</pre></td></tr>
<tr><td class="linenum">86</td><td class="correct"><pre> raise (Bug ("foo" ^ "quux"</pre></td><td class="correct"><pre> raise (Bug ("foo" ^ "quux"</pre></td></tr>
<tr><td class="linenum">87</td><td class="correct"><pre> ^ "bar"));</pre></td><td class="correct"><pre> ^ "bar"));</pre></td></tr>
<tr><td class="linenum">88</td><td class="correct"><pre> raise (Bug (foo + quux</pre></td><td class="correct"><pre> raise (Bug (foo + quux</pre></td></tr>
<tr><td class="linenum">89</td><td class="correct"><pre> ^ "bar"));</pre></td><td class="correct"><pre> ^ "bar"));</pre></td></tr>
<tr><td class="linenum">90</td><td class="correct"><pre> raise (Bug ((foo + quux)</pre></td><td class="correct"><pre> raise (Bug ((foo + quux)</pre></td></tr>
<tr><td class="linenum">91</td><td class="correct"><pre> ^ "bar"))</pre></td><td class="correct"><pre> ^ "bar"))</pre></td></tr>
<tr><td class="linenum">92</td><td class="correct"><pre></pre></td><td class="correct"><pre></pre></td></tr>
<tr><td class="linenum">93</td><td class="correct"><pre>(* Except in specific cases, we want the argument indented relative to the</pre></td><td class="correct"><pre>(* Except in specific cases, we want the argument indented relative to the</pre></td></tr>
<tr><td class="linenum">94</td><td class="correct"><pre> function being called. (Exceptions include "fun" arguments where the line</pre></td><td class="correct"><pre> function being called. (Exceptions include "fun" arguments where the line</pre></td></tr>
<tr><td class="linenum">95</td><td class="correct"><pre> ends with "->" and subsequent lines beginning with operators, like above.) *)</pre></td><td class="correct"><pre> ends with "->" and subsequent lines beginning with operators, like above.) *)</pre></td></tr>
<tr><td class="linenum">96</td><td class="correct"><pre>let () =</pre></td><td class="correct"><pre>let () =</pre></td></tr>
<tr><td class="linenum">97</td><td class="correct"><pre> Some (Message_store.create s</pre></td><td class="correct"><pre> Some (Message_store.create s</pre></td></tr>
<tr><td class="linenum">98</td><td class="correct"><pre> "herd-retransmitter" ~unlink:true Message_store.Message_size.Byte)</pre></td><td class="correct"><pre> "herd-retransmitter" ~unlink:true Message_store.Message_size.Byte)</pre></td></tr>
<tr><td class="linenum">99</td><td class="correct"><pre></pre></td><td class="correct"><pre></pre></td></tr>
<tr><td class="linenum">100</td><td class="correct"><pre></pre></td><td class="correct"><pre></pre></td></tr>
<tr><td class="linenum">101</td><td class="correct"><pre></pre></td><td class="correct"><pre></pre></td></tr>
<tr><td class="linenum">102</td><td class="correct"><pre>(* We like the indentation of most arguments, but want to get back towards the</pre></td><td class="correct"><pre>(* We like the indentation of most arguments, but want to get back towards the</pre></td></tr>
<tr><td class="linenum">103</td><td class="correct"><pre> left margin in a few special cases: *)</pre></td><td class="correct"><pre> left margin in a few special cases: *)</pre></td></tr>
<tr><td class="linenum">104</td><td class="correct"><pre>let _ =</pre></td><td class="correct"><pre>let _ =</pre></td></tr>
<tr><td class="linenum">105</td><td class="correct"><pre> foo (bar (fun x -> (* special: "fun _ ->" at EOL *)</pre></td><td class="correct"><pre> foo (bar (fun x -> (* special: "fun _ ->" at EOL *)</pre></td></tr>
<tr><td class="linenum">106</td><td class="correct"><pre> baz)) (* assume no more arguments *)</pre></td><td class="correct"><pre> baz)) (* assume no more arguments *)</pre></td></tr>
<tr><td class="linenum">107</td><td class="correct"><pre>let _ =</pre></td><td class="correct"><pre>let _ =</pre></td></tr>
<tr><td class="linenum">108</td><td class="correct"><pre> foo</pre></td><td class="correct"><pre> foo</pre></td></tr>
<tr><td class="linenum">109</td><td class="correct"><pre> ~a_long_field_name:(check (fun bar -></pre></td><td class="correct"><pre> ~a_long_field_name:(check (fun bar -></pre></td></tr>
<tr><td class="linenum">110</td><td class="correct"><pre> baz))</pre></td><td class="correct"><pre> baz))</pre></td></tr>
<tr><td class="linenum">111</td><td class="correct"><pre>let _ =</pre></td><td class="correct"><pre>let _ =</pre></td></tr>
<tr><td class="linenum">112</td><td class="correct"><pre> foo ~a_long_field_name:(check (fun bar -></pre></td><td class="correct"><pre> foo ~a_long_field_name:(check (fun bar -></pre></td></tr>
<tr><td class="linenum">113</td><td class="correct"><pre> baz))</pre></td><td class="correct"><pre> baz))</pre></td></tr>
<tr><td class="linenum">114</td><td class="correct"><pre>let _ =</pre></td><td class="correct"><pre>let _ =</pre></td></tr>
<tr><td class="linenum">115</td><td class="correct"><pre> foo (bar (quux (fnord (fun x -> (* any depth *)</pre></td><td class="correct"><pre> foo (bar (quux (fnord (fun x -> (* any depth *)</pre></td></tr>
<tr><td class="linenum">116</td><td class="correct"><pre> baz))))</pre></td><td class="correct"><pre> baz))))</pre></td></tr>
<tr><td class="linenum">117</td><td class="correct"><pre></pre></td><td class="correct"><pre></pre></td></tr>
<tr><td class="linenum">118</td><td class="correct"><pre>(* We also wanted to tweak the operator indentation, making operators like <=</pre></td><td class="correct"><pre>(* We also wanted to tweak the operator indentation, making operators like <=</pre></td></tr>
<tr><td class="linenum">119</td><td class="correct"><pre> not special cases in contexts like this: *)</pre></td><td class="correct"><pre> not special cases in contexts like this: *)</pre></td></tr>
<tr><td class="linenum">120</td><td class="correct"><pre>let _ =</pre></td><td class="correct"><pre>let _ =</pre></td></tr>
<tr><td class="linenum">121</td><td class="correct"><pre> assert (foo (bar + baz</pre></td><td class="correct"><pre> assert (foo (bar + baz</pre></td></tr>
<tr><td class="linenum">122</td><td class="correct"><pre> <= quux)) (* lined up under left argument to op,</pre></td><td class="correct"><pre> <= quux)) (* lined up under left argument to op,</pre></td></tr>
<tr><td class="linenum">123</td><td class="correct"><pre> sim. to ^ above *)</pre></td><td class="correct"><pre> sim. to ^ above *)</pre></td></tr>
<tr><td class="linenum">124</td><td class="correct"><pre>let _ =</pre></td><td class="correct"><pre>let _ =</pre></td></tr>
<tr><td class="linenum">125</td><td class="correct"><pre> let min_closing_backoff =</pre></td><td class="correct"><pre> let min_closing_backoff =</pre></td></tr>
<tr><td class="linenum">126</td><td class="correct"><pre> -. ( Hidden_float.expose (arb.cfg.base_edge @! Buy)</pre></td><td class="correct"><pre> -. ( Hidden_float.expose (arb.cfg.base_edge @! Buy)</pre></td></tr>
<tr><td class="linenum">127</td><td class="different"><pre>········+.·Hidden_float.expose·(arb.cfg.base_edge·@!·Sell))</pre></td><td class="different"><pre>···········+.·Hidden_float.expose·(arb.cfg.base_edge·@!·Sell))</pre></td></tr>
<tr><td class="linenum">128</td><td class="correct"><pre> in</pre></td><td class="correct"><pre> in</pre></td></tr>
<tr><td class="linenum">129</td><td class="correct"><pre> 0</pre></td><td class="correct"><pre> 0</pre></td></tr>
<tr><td class="linenum">130</td><td class="correct"><pre></pre></td><td class="correct"><pre></pre></td></tr>
<tr><td class="linenum">131</td><td class="correct"><pre>(* Sim. indentation of if conditions: *)</pre></td><td class="correct"><pre>(* Sim. indentation of if conditions: *)</pre></td></tr>
<tr><td class="linenum">132</td><td class="correct"><pre>let _ =</pre></td><td class="correct"><pre>let _ =</pre></td></tr>
<tr><td class="linenum">133</td><td class="correct"><pre> if (a</pre></td><td class="correct"><pre> if (a</pre></td></tr>
<tr><td class="linenum">134</td><td class="correct"><pre> <= b)</pre></td><td class="correct"><pre> <= b)</pre></td></tr>
<tr><td class="linenum">135</td><td class="correct"><pre> then ()</pre></td><td class="correct"><pre> then ()</pre></td></tr>
<tr><td class="linenum">136</td><td class="correct"><pre>let _ =</pre></td><td class="correct"><pre>let _ =</pre></td></tr>
<tr><td class="linenum">137</td><td class="correct"><pre> if a</pre></td><td class="correct"><pre> if a</pre></td></tr>
<tr><td class="linenum">138</td><td class="correct"><pre> <= b</pre></td><td class="correct"><pre> <= b</pre></td></tr>
<tr><td class="linenum">139</td><td class="correct"><pre> then ()</pre></td><td class="correct"><pre> then ()</pre></td></tr>
<tr><td class="linenum">140</td><td class="correct"><pre>let _ =</pre></td><td class="correct"><pre>let _ =</pre></td></tr>
<tr><td class="linenum">141</td><td class="correct"><pre> if Edge_adjustment.is_zero arb.cfg.extra_edge</pre></td><td class="correct"><pre> if Edge_adjustment.is_zero arb.cfg.extra_edge</pre></td></tr>
<tr><td class="linenum">142</td><td class="different"><pre>·····&&·0.·=·sys.plugs.edge_backoff</pre></td><td class="different"><pre>··&&·0.·=·sys.plugs.edge_backoff</pre></td></tr>
<tr><td class="linenum">143</td><td class="different"><pre>·····&&·0.·=·zero_acvol_edge_backoff</pre></td><td class="different"><pre>··&&·0.·=·zero_acvol_edge_backoff</pre></td></tr>
<tr><td class="linenum">144</td><td class="correct"><pre> then 0.</pre></td><td class="correct"><pre> then 0.</pre></td></tr>
<tr><td class="linenum">145</td><td class="correct"><pre> else 1.</pre></td><td class="correct"><pre> else 1.</pre></td></tr>
<tr><td class="linenum">146</td><td class="correct"><pre>let _ =</pre></td><td class="correct"><pre>let _ =</pre></td></tr>
<tr><td class="linenum">147</td><td class="correct"><pre> if</pre></td><td class="correct"><pre> if</pre></td></tr>
<tr><td class="linenum">148</td><td class="correct"><pre> Edge_adjustment.is_zero arb.cfg.extra_edge</pre></td><td class="correct"><pre> Edge_adjustment.is_zero arb.cfg.extra_edge</pre></td></tr>
<tr><td class="linenum">149</td><td class="correct"><pre> && 0. = sys.plugs.edge_backoff</pre></td><td class="correct"><pre> && 0. = sys.plugs.edge_backoff</pre></td></tr>
<tr><td class="linenum">150</td><td class="correct"><pre> && 0. = zero_acvol_edge_backoff</pre></td><td class="correct"><pre> && 0. = zero_acvol_edge_backoff</pre></td></tr>
<tr><td class="linenum">151</td><td class="correct"><pre> then 0.</pre></td><td class="correct"><pre> then 0.</pre></td></tr>
<tr><td class="linenum">152</td><td class="correct"><pre> else 1.</pre></td><td class="correct"><pre> else 1.</pre></td></tr>
<tr><td class="linenum">153</td><td class="correct"><pre>let _ =</pre></td><td class="correct"><pre>let _ =</pre></td></tr>
<tr><td class="linenum">154</td><td class="correct"><pre> let entries = List.filter (Lazy.force transferstati) ~f:(fun ts -></pre></td><td class="correct"><pre> let entries = List.filter (Lazy.force transferstati) ~f:(fun ts -></pre></td></tr>
<tr><td class="linenum">155</td><td class="correct"><pre> Pcre.pmatch ~pat ts.RQ.description</pre></td><td class="correct"><pre> Pcre.pmatch ~pat ts.RQ.description</pre></td></tr>
<tr><td class="linenum">156</td><td class="correct"><pre> ) in</pre></td><td class="correct"><pre> ) in</pre></td></tr>
<tr><td class="linenum">157</td><td class="correct"><pre> x</pre></td><td class="correct"><pre> x</pre></td></tr>
<tr><td class="linenum">158</td><td class="correct"><pre></pre></td><td class="correct"><pre></pre></td></tr>
<tr><td class="linenum">159</td><td class="correct"><pre>(* combination of operator at BOL and -> at EOL: *)</pre></td><td class="correct"><pre>(* combination of operator at BOL and -> at EOL: *)</pre></td></tr>
<tr><td class="linenum">160</td><td class="correct"><pre>let _ =</pre></td><td class="correct"><pre>let _ =</pre></td></tr>
<tr><td class="linenum">161</td><td class="correct"><pre> Shell.ssh_lines x</pre></td><td class="correct"><pre> Shell.ssh_lines x</pre></td></tr>
<tr><td class="linenum">162</td><td class="correct"><pre> |! List.map ~f:(f (g (fun x -></pre></td><td class="correct"><pre> |! List.map ~f:(f (g (fun x -></pre></td></tr>
<tr><td class="linenum">163</td><td class="different"><pre>·······let·name,·path·=·String.lsplit2_exn·~on:'|'·x·in</pre></td><td class="different"><pre>····let·name,·path·=·String.lsplit2_exn·~on:'|'·x·in</pre></td></tr>
<tr><td class="linenum">164</td><td class="different"><pre>·······String.strip·name,·String.strip·path)))</pre></td><td class="different"><pre>····String.strip·name,·String.strip·path)))</pre></td></tr>
<tr><td class="linenum">165</td><td class="correct"><pre></pre></td><td class="correct"><pre></pre></td></tr>
<tr><td class="linenum">166</td><td class="correct"><pre>(* open paren ending line like begin *)</pre></td><td class="correct"><pre>(* open paren ending line like begin *)</pre></td></tr>
<tr><td class="linenum">167</td><td class="correct"><pre>let _ =</pre></td><td class="correct"><pre>let _ =</pre></td></tr>
<tr><td class="linenum">168</td><td class="correct"><pre> if a (p ^/ "s") [ e ] = Ok () then `S (</pre></td><td class="correct"><pre> if a (p ^/ "s") [ e ] = Ok () then `S (</pre></td></tr>
<tr><td class="linenum">169</td><td class="correct"><pre> let label count =</pre></td><td class="correct"><pre> let label count =</pre></td></tr>
<tr><td class="linenum">170</td><td class="correct"><pre> sprintf "%d s" c ^ if c = 1 then ":" else "s"</pre></td><td class="correct"><pre> sprintf "%d s" c ^ if c = 1 then ":" else "s"</pre></td></tr>
<tr><td class="linenum">171</td><td class="correct"><pre> in</pre></td><td class="correct"><pre> in</pre></td></tr>
<tr><td class="linenum">172</td><td class="correct"><pre> x</pre></td><td class="correct"><pre> x</pre></td></tr>
<tr><td class="linenum">173</td><td class="correct"><pre> )</pre></td><td class="correct"><pre> )</pre></td></tr>
</table>
</div>
<div>
<h2>Differences in js-comment.ml.ref</h2>
<table>
<tr><th><th>Expected<th>Ocp-indent output</tr>
<tr><td class="linenum">0</td><td class="correct"><pre>(* ocp-indent is not going to be confused by comment-embedded tokens. *)</pre></td><td class="correct"><pre>(* ocp-indent is not going to be confused by comment-embedded tokens. *)</pre></td></tr>
<tr><td class="linenum">1</td><td class="correct"><pre></pre></td><td class="correct"><pre></pre></td></tr>
<tr><td class="linenum">2</td><td class="correct"><pre></pre></td><td class="correct"><pre></pre></td></tr>
<tr><td class="linenum">3</td><td class="correct"><pre></pre></td><td class="correct"><pre></pre></td></tr>
<tr><td class="linenum">4</td><td class="correct"><pre>type t = {</pre></td><td class="correct"><pre>type t = {</pre></td></tr>
<tr><td class="linenum">5</td><td class="correct"><pre> (* This is a comment *)</pre></td><td class="correct"><pre> (* This is a comment *)</pre></td></tr>
<tr><td class="linenum">6</td><td class="correct"><pre> a: int;</pre></td><td class="correct"><pre> a: int;</pre></td></tr>
<tr><td class="linenum">7</td><td class="correct"><pre>}</pre></td><td class="correct"><pre>}</pre></td></tr>
<tr><td class="linenum">8</td><td class="correct"><pre></pre></td><td class="correct"><pre></pre></td></tr>
<tr><td class="linenum">9</td><td class="correct"><pre>type t = {</pre></td><td class="correct"><pre>type t = {</pre></td></tr>
<tr><td class="linenum">10</td><td class="correct"><pre> (* This is a comment : with a colon. *)</pre></td><td class="correct"><pre> (* This is a comment : with a colon. *)</pre></td></tr>
<tr><td class="linenum">11</td><td class="correct"><pre> a: int;</pre></td><td class="correct"><pre> a: int;</pre></td></tr>
<tr><td class="linenum">12</td><td class="correct"><pre>}</pre></td><td class="correct"><pre>}</pre></td></tr>
<tr><td class="linenum">13</td><td class="correct"><pre></pre></td><td class="correct"><pre></pre></td></tr>
<tr><td class="linenum">14</td><td class="correct"><pre>type t = {</pre></td><td class="correct"><pre>type t = {</pre></td></tr>
<tr><td class="linenum">15</td><td class="correct"><pre> a: int;</pre></td><td class="correct"><pre> a: int;</pre></td></tr>
<tr><td class="linenum">16</td><td class="correct"><pre> (* with the : second field *)</pre></td><td class="correct"><pre> (* with the : second field *)</pre></td></tr>
<tr><td class="linenum">17</td><td class="correct"><pre> b: int;</pre></td><td class="correct"><pre> b: int;</pre></td></tr>
<tr><td class="linenum">18</td><td class="correct"><pre>}</pre></td><td class="correct"><pre>}</pre></td></tr>
<tr><td class="linenum">19</td><td class="correct"><pre></pre></td><td class="correct"><pre></pre></td></tr>
<tr><td class="linenum">20</td><td class="correct"><pre>type t = {</pre></td><td class="correct"><pre>type t = {</pre></td></tr>
<tr><td class="linenum">21</td><td class="correct"><pre> a: int;</pre></td><td class="correct"><pre> a: int;</pre></td></tr>
<tr><td class="linenum">22</td><td class="correct"><pre> b: int;</pre></td><td class="correct"><pre> b: int;</pre></td></tr>
<tr><td class="linenum">23</td><td class="correct"><pre> (* and : the third... *)</pre></td><td class="correct"><pre> (* and : the third... *)</pre></td></tr>
<tr><td class="linenum">24</td><td class="correct"><pre> c: int;</pre></td><td class="correct"><pre> c: int;</pre></td></tr>
<tr><td class="linenum">25</td><td class="correct"><pre>}</pre></td><td class="correct"><pre>}</pre></td></tr>
<tr><td class="linenum">26</td><td class="correct"><pre></pre></td><td class="correct"><pre></pre></td></tr>
<tr><td class="linenum">27</td><td class="correct"><pre></pre></td><td class="correct"><pre></pre></td></tr>
<tr><td class="linenum">28</td><td class="correct"><pre></pre></td><td class="correct"><pre></pre></td></tr>
<tr><td class="linenum">29</td><td class="correct"><pre>(* colon in CR comment messes Tuareg up *)</pre></td><td class="correct"><pre>(* colon in CR comment messes Tuareg up *)</pre></td></tr>
<tr><td class="linenum">30</td><td class="correct"><pre>type cfg = {</pre></td><td class="correct"><pre>type cfg = {</pre></td></tr>
<tr><td class="linenum">31</td><td class="correct"><pre> foo : int; (* CR mburns: float? *)</pre></td><td class="correct"><pre> foo : int; (* CR mburns: float? *)</pre></td></tr>
<tr><td class="linenum">32</td><td class="correct"><pre> bar : string;</pre></td><td class="correct"><pre> bar : string;</pre></td></tr>
<tr><td class="linenum">33</td><td class="correct"><pre>}</pre></td><td class="correct"><pre>}</pre></td></tr>
<tr><td class="linenum">34</td><td class="correct"><pre></pre></td><td class="correct"><pre></pre></td></tr>
<tr><td class="linenum">35</td><td class="correct"><pre>(* To be more precise about the Tuareg bug, it is the fact that the colon in the comment</pre></td><td class="correct"><pre>(* To be more precise about the Tuareg bug, it is the fact that the colon in the comment</pre></td></tr>
<tr><td class="linenum">36</td><td class="correct"><pre> is the first or second colon after the start of the record definition. If the comment</pre></td><td class="correct"><pre> is the first or second colon after the start of the record definition. If the comment</pre></td></tr>
<tr><td class="linenum">37</td><td class="correct"><pre> occurs after the first 2 fields in the record everything is fine.</pre></td><td class="correct"><pre> occurs after the first 2 fields in the record everything is fine.</pre></td></tr>
<tr><td class="linenum">38</td><td class="correct"><pre></pre></td><td class="correct"><pre></pre></td></tr>
<tr><td class="linenum">39</td><td class="correct"><pre> For example, this is OK: *)</pre></td><td class="correct"><pre> For example, this is OK: *)</pre></td></tr>
<tr><td class="linenum">40</td><td class="correct"><pre>type t= {</pre></td><td class="correct"><pre>type t= {</pre></td></tr>
<tr><td class="linenum">41</td><td class="correct"><pre> foo : int;</pre></td><td class="correct"><pre> foo : int;</pre></td></tr>
<tr><td class="linenum">42</td><td class="correct"><pre> bar : string; (* CR mburns: float? *)</pre></td><td class="correct"><pre> bar : string; (* CR mburns: float? *)</pre></td></tr>
<tr><td class="linenum">43</td><td class="correct"><pre> baz : string;</pre></td><td class="correct"><pre> baz : string;</pre></td></tr>
<tr><td class="linenum">44</td><td class="correct"><pre>}</pre></td><td class="correct"><pre>}</pre></td></tr>
<tr><td class="linenum">45</td><td class="correct"><pre></pre></td><td class="correct"><pre></pre></td></tr>
<tr><td class="linenum">46</td><td class="correct"><pre>(* but Tuareg messes this up *)</pre></td><td class="correct"><pre>(* but Tuareg messes this up *)</pre></td></tr>
<tr><td class="linenum">47</td><td class="correct"><pre>type t= {</pre></td><td class="correct"><pre>type t= {</pre></td></tr>
<tr><td class="linenum">48</td><td class="correct"><pre> foo : int;</pre></td><td class="correct"><pre> foo : int;</pre></td></tr>
<tr><td class="linenum">49</td><td class="correct"><pre> (* CR mburns: float? *)</pre></td><td class="correct"><pre> (* CR mburns: float? *)</pre></td></tr>
<tr><td class="linenum">50</td><td class="correct"><pre> bar : string;</pre></td><td class="correct"><pre> bar : string;</pre></td></tr>
<tr><td class="linenum">51</td><td class="correct"><pre>}</pre></td><td class="correct"><pre>}</pre></td></tr>
<tr><td class="linenum">52</td><td class="correct"><pre></pre></td><td class="correct"><pre></pre></td></tr>
<tr><td class="linenum">53</td><td class="correct"><pre></pre></td><td class="correct"><pre></pre></td></tr>
<tr><td class="linenum">54</td><td class="correct"><pre></pre></td><td class="correct"><pre></pre></td></tr>
<tr><td class="linenum">55</td><td class="correct"><pre>(* Now that we have support for {v v} and {[ ]}, reindent inside comments,</pre></td><td class="correct"><pre>(* Now that we have support for {v v} and {[ ]}, reindent inside comments,</pre></td></tr>
<tr><td class="linenum">56</td><td class="correct"><pre> unless they are explicitly delimited as code or pre-formatted text. These</pre></td><td class="correct"><pre> unless they are explicitly delimited as code or pre-formatted text. These</pre></td></tr>
<tr><td class="linenum">57</td><td class="correct"><pre> three all end up flattened to the same level. *)</pre></td><td class="correct"><pre> three all end up flattened to the same level. *)</pre></td></tr>
<tr><td class="linenum">58</td><td class="correct"><pre>(*</pre></td><td class="correct"><pre>(*</pre></td></tr>
<tr><td class="linenum">59</td><td class="correct"><pre> type t = {</pre></td><td class="correct"><pre> type t = {</pre></td></tr>
<tr><td class="linenum">60</td><td class="correct"><pre> (* This is a comment *)</pre></td><td class="correct"><pre> (* This is a comment *)</pre></td></tr>
<tr><td class="linenum">61</td><td class="correct"><pre> a: int;</pre></td><td class="correct"><pre> a: int;</pre></td></tr>
<tr><td class="linenum">62</td><td class="correct"><pre> }</pre></td><td class="correct"><pre> }</pre></td></tr>
<tr><td class="linenum">63</td><td class="correct"><pre>*)</pre></td><td class="correct"><pre>*)</pre></td></tr>
<tr><td class="linenum">64</td><td class="correct"><pre>(*</pre></td><td class="correct"><pre>(*</pre></td></tr>
<tr><td class="linenum">65</td><td class="correct"><pre> type t = {</pre></td><td class="correct"><pre> type t = {</pre></td></tr>
<tr><td class="linenum">66</td><td class="correct"><pre> (* This is a comment *)</pre></td><td class="correct"><pre> (* This is a comment *)</pre></td></tr>
<tr><td class="linenum">67</td><td class="correct"><pre> a: int;</pre></td><td class="correct"><pre> a: int;</pre></td></tr>
<tr><td class="linenum">68</td><td class="correct"><pre> }</pre></td><td class="correct"><pre> }</pre></td></tr>
<tr><td class="linenum">69</td><td class="correct"><pre>*)</pre></td><td class="correct"><pre>*)</pre></td></tr>
<tr><td class="linenum">70</td><td class="correct"><pre>(*</pre></td><td class="correct"><pre>(*</pre></td></tr>
<tr><td class="linenum">71</td><td class="correct"><pre> type t = {</pre></td><td class="correct"><pre> type t = {</pre></td></tr>
<tr><td class="linenum">72</td><td class="correct"><pre> (* This is a comment *)</pre></td><td class="correct"><pre> (* This is a comment *)</pre></td></tr>
<tr><td class="linenum">73</td><td class="correct"><pre> a: int;</pre></td><td class="correct"><pre> a: int;</pre></td></tr>
<tr><td class="linenum">74</td><td class="correct"><pre> }</pre></td><td class="correct"><pre> }</pre></td></tr>
<tr><td class="linenum">75</td><td class="correct"><pre>*)</pre></td><td class="correct"><pre>*)</pre></td></tr>
<tr><td class="linenum">76</td><td class="correct"><pre></pre></td><td class="correct"><pre></pre></td></tr>
<tr><td class="linenum">77</td><td class="correct"><pre></pre></td><td class="correct"><pre></pre></td></tr>
<tr><td class="linenum">78</td><td class="correct"><pre></pre></td><td class="correct"><pre></pre></td></tr>
<tr><td class="linenum">79</td><td class="correct"><pre>(* Possible to-do warning: Star-prefixed lines are allowed and indented a little</pre></td><td class="correct"><pre>(* Possible to-do warning: Star-prefixed lines are allowed and indented a little</pre></td></tr>
<tr><td class="linenum">80</td><td class="correct"><pre> less, to line up with the star in the opening comment parenthesis. Maybe we</pre></td><td class="correct"><pre> less, to line up with the star in the opening comment parenthesis. Maybe we</pre></td></tr>
<tr><td class="linenum">81</td><td class="correct"><pre> don't care enough about them to worry about it, though. *)</pre></td><td class="correct"><pre> don't care enough about them to worry about it, though. *)</pre></td></tr>
<tr><td class="linenum">82</td><td class="correct"><pre></pre></td><td class="correct"><pre></pre></td></tr>
<tr><td class="linenum">83</td><td class="correct"><pre></pre></td><td class="correct"><pre></pre></td></tr>
<tr><td class="linenum">84</td><td class="correct"><pre></pre></td><td class="correct"><pre></pre></td></tr>
<tr><td class="linenum">85</td><td class="correct"><pre>(** Doc comment text should be aligned with the first line, so indented more</pre></td><td class="correct"><pre>(** Doc comment text should be aligned with the first line, so indented more</pre></td></tr>
<tr><td class="linenum">86</td><td class="correct"><pre> than otherwise. *)</pre></td><td class="correct"><pre> than otherwise. *)</pre></td></tr>
<tr><td class="linenum">87</td><td class="correct"><pre></pre></td><td class="correct"><pre></pre></td></tr>
<tr><td class="linenum">88</td><td class="correct"><pre>(* We're now using some ocamldoc block syntax to control indentation, and sweeks</pre></td><td class="correct"><pre>(* We're now using some ocamldoc block syntax to control indentation, and sweeks</pre></td></tr>
<tr><td class="linenum">89</td><td class="correct"><pre> and the rest of us have been relying on it, in and out of doc comments.</pre></td><td class="correct"><pre> and the rest of us have been relying on it, in and out of doc comments.</pre></td></tr>
<tr><td class="linenum">90</td><td class="correct"><pre></pre></td><td class="correct"><pre></pre></td></tr>
<tr><td class="linenum">91</td><td class="correct"><pre> {[</pre></td><td class="correct"><pre> {[</pre></td></tr>
<tr><td class="linenum">92</td><td class="correct"><pre> let code =</pre></td><td class="correct"><pre> let code =</pre></td></tr>
<tr><td class="linenum">93</td><td class="correct"><pre> should be reindented like code</pre></td><td class="correct"><pre> should be reindented like code</pre></td></tr>
<tr><td class="linenum">94</td><td class="correct"><pre> so as to work also with vim</pre></td><td class="correct"><pre> so as to work also with vim</pre></td></tr>
<tr><td class="linenum">95</td><td class="correct"><pre> ]}</pre></td><td class="correct"><pre> ]}</pre></td></tr>
<tr><td class="linenum">96</td><td class="correct"><pre></pre></td><td class="correct"><pre></pre></td></tr>
<tr><td class="linenum">97</td><td class="correct"><pre> {v g</pre></td><td class="correct"><pre> {v g</pre></td></tr>
<tr><td class="linenum">98</td><td class="correct"><pre> This is totally verbatim text and shouldn't be reindented. Maybe you don't</pre></td><td class="correct"><pre> This is totally verbatim text and shouldn't be reindented. Maybe you don't</pre></td></tr>
<tr><td class="linenum">99</td><td class="correct"><pre> need to special-case this, since you will not be reindenting comments. It</pre></td><td class="correct"><pre> need to special-case this, since you will not be reindenting comments. It</pre></td></tr>
<tr><td class="linenum">100</td><td class="correct"><pre> probably doesn't matter what the indentation of the first line of a</pre></td><td class="correct"><pre> probably doesn't matter what the indentation of the first line of a</pre></td></tr>
<tr><td class="linenum">101</td><td class="correct"><pre>verbatim block is. But how will this be done in vim?</pre></td><td class="correct"><pre>verbatim block is. But how will this be done in vim?</pre></td></tr>
<tr><td class="linenum">102</td><td class="correct"><pre> xx</pre></td><td class="correct"><pre> xx</pre></td></tr>
<tr><td class="linenum">103</td><td class="correct"><pre> yy</pre></td><td class="correct"><pre> yy</pre></td></tr>
<tr><td class="linenum">104</td><td class="correct"><pre> zz</pre></td><td class="correct"><pre> zz</pre></td></tr>
<tr><td class="linenum">105</td><td class="correct"><pre> c v}</pre></td><td class="correct"><pre> c v}</pre></td></tr>
<tr><td class="linenum">106</td><td class="correct"><pre></pre></td><td class="correct"><pre></pre></td></tr>
<tr><td class="linenum">107</td><td class="correct"><pre> Does this even confront ocp-indent? I think, when reindenting whole files,</pre></td><td class="correct"><pre> Does this even confront ocp-indent? I think, when reindenting whole files,</pre></td></tr>
<tr><td class="linenum">108</td><td class="correct"><pre> source code blocks do confront ocp-indent.</pre></td><td class="correct"><pre> source code blocks do confront ocp-indent.</pre></td></tr>
<tr><td class="linenum">109</td><td class="correct"><pre>*)</pre></td><td class="correct"><pre>*)</pre></td></tr>
<tr><td class="linenum">110</td><td class="correct"><pre></pre></td><td class="correct"><pre></pre></td></tr>
<tr><td class="linenum">111</td><td class="correct"><pre></pre></td><td class="correct"><pre></pre></td></tr>
<tr><td class="linenum">112</td><td class="correct"><pre></pre></td><td class="correct"><pre></pre></td></tr>
<tr><td class="linenum">113</td><td class="correct"><pre>(* {v</pre></td><td class="correct"><pre>(* {v</pre></td></tr>
<tr><td class="linenum">114</td><td class="correct"><pre></pre></td><td class="correct"><pre></pre></td></tr>
<tr><td class="linenum">115</td><td class="correct"><pre>(* comments embedded in verbatim sections *)</pre></td><td class="correct"><pre>(* comments embedded in verbatim sections *)</pre></td></tr>
<tr><td class="linenum">116</td><td class="correct"><pre>(* want to be able to verbatim-out big chunks of code *)</pre></td><td class="correct"><pre>(* want to be able to verbatim-out big chunks of code *)</pre></td></tr>
<tr><td class="linenum">117</td><td class="correct"><pre></pre></td><td class="correct"><pre></pre></td></tr>
<tr><td class="linenum">118</td><td class="correct"><pre>v} *)</pre></td><td class="correct"><pre>v} *)</pre></td></tr>
<tr><td class="linenum">119</td><td class="correct"><pre></pre></td><td class="correct"><pre></pre></td></tr>
<tr><td class="linenum">120</td><td class="correct"><pre></pre></td><td class="correct"><pre></pre></td></tr>
<tr><td class="linenum">121</td><td class="correct"><pre></pre></td><td class="correct"><pre></pre></td></tr>
<tr><td class="linenum">122</td><td class="correct"><pre>(* {v</pre></td><td class="correct"><pre>(* {v</pre></td></tr>
<tr><td class="linenum">123</td><td class="correct"><pre></pre></td><td class="correct"><pre></pre></td></tr>
<tr><td class="linenum">124</td><td class="correct"><pre>non-comments in verbatim sections</pre></td><td class="correct"><pre>non-comments in verbatim sections</pre></td></tr>
<tr><td class="linenum">125</td><td class="correct"><pre>duh</pre></td><td class="correct"><pre>duh</pre></td></tr>
<tr><td class="linenum">126</td><td class="correct"><pre></pre></td><td class="correct"><pre></pre></td></tr>
<tr><td class="linenum">127</td><td class="correct"><pre>v} *)</pre></td><td class="correct"><pre>v} *)</pre></td></tr>
<tr><td class="linenum">128</td><td class="correct"><pre></pre></td><td class="correct"><pre></pre></td></tr>
<tr><td class="linenum">129</td><td class="correct"><pre></pre></td><td class="correct"><pre></pre></td></tr>
<tr><td class="linenum">130</td><td class="correct"><pre></pre></td><td class="correct"><pre></pre></td></tr>
<tr><td class="linenum">131</td><td class="correct"><pre>module M = struct</pre></td><td class="correct"><pre>module M = struct</pre></td></tr>
<tr><td class="linenum">132</td><td class="correct"><pre> let x = 0</pre></td><td class="correct"><pre> let x = 0</pre></td></tr>
<tr><td class="linenum">133</td><td class="correct"><pre></pre></td><td class="correct"><pre></pre></td></tr>
<tr><td class="linenum">134</td><td class="correct"><pre> (* reference *)</pre></td><td class="correct"><pre> (* reference *)</pre></td></tr>
<tr><td class="linenum">135</td><td class="correct"><pre>end</pre></td><td class="correct"><pre>end</pre></td></tr>
<tr><td class="linenum">136</td><td class="correct"><pre></pre></td><td class="correct"><pre></pre></td></tr>
<tr><td class="linenum">137</td><td class="correct"><pre>module M = struct</pre></td><td class="correct"><pre>module M = struct</pre></td></tr>
<tr><td class="linenum">138</td><td class="correct"><pre> let () =</pre></td><td class="correct"><pre> let () =</pre></td></tr>
<tr><td class="linenum">139</td><td class="correct"><pre> ()</pre></td><td class="correct"><pre> ()</pre></td></tr>
<tr><td class="linenum">140</td><td class="correct"><pre></pre></td><td class="correct"><pre></pre></td></tr>
<tr><td class="linenum">141</td><td class="correct"><pre> (* If there's a blank line before this, at least, shouldn't it revert to the</pre></td><td class="correct"><pre> (* If there's a blank line before this, at least, shouldn't it revert to the</pre></td></tr>
<tr><td class="linenum">142</td><td class="correct"><pre> block-level indentation, even if it doesn't precede a declaration? As</pre></td><td class="correct"><pre> block-level indentation, even if it doesn't precede a declaration? As</pre></td></tr>
<tr><td class="linenum">143</td><td class="correct"><pre> long as the prior declaration is complete, I mean. If there isn't a</pre></td><td class="correct"><pre> long as the prior declaration is complete, I mean. If there isn't a</pre></td></tr>
<tr><td class="linenum">144</td><td class="correct"><pre> blank line, I can see associating the comment with the line before. *)</pre></td><td class="correct"><pre> blank line, I can see associating the comment with the line before. *)</pre></td></tr>
<tr><td class="linenum">145</td><td class="correct"><pre>end</pre></td><td class="correct"><pre>end</pre></td></tr>
<tr><td class="linenum">146</td><td class="correct"><pre></pre></td><td class="correct"><pre></pre></td></tr>
<tr><td class="linenum">147</td><td class="correct"><pre>module M = struct</pre></td><td class="correct"><pre>module M = struct</pre></td></tr>
<tr><td class="linenum">148</td><td class="correct"><pre> let () = ()</pre></td><td class="correct"><pre> let () = ()</pre></td></tr>
<tr><td class="linenum">149</td><td class="correct"><pre></pre></td><td class="correct"><pre></pre></td></tr>
<tr><td class="linenum">150</td><td class="correct"><pre> (* sim. *)</pre></td><td class="correct"><pre> (* sim. *)</pre></td></tr>
<tr><td class="linenum">151</td><td class="correct"><pre>end</pre></td><td class="correct"><pre>end</pre></td></tr>
<tr><td class="linenum">152</td><td class="correct"><pre></pre></td><td class="correct"><pre></pre></td></tr>
<tr><td class="linenum">153</td><td class="correct"><pre>module M = struct</pre></td><td class="correct"><pre>module M = struct</pre></td></tr>
<tr><td class="linenum">154</td><td class="correct"><pre> let () =</pre></td><td class="correct"><pre> let () =</pre></td></tr>
<tr><td class="linenum">155</td><td class="correct"><pre> ()</pre></td><td class="correct"><pre> ()</pre></td></tr>
<tr><td class="linenum">156</td><td class="correct"><pre></pre></td><td class="correct"><pre></pre></td></tr>
<tr><td class="linenum">157</td><td class="correct"><pre> (* no problem *)</pre></td><td class="correct"><pre> (* no problem *)</pre></td></tr>
<tr><td class="linenum">158</td><td class="correct"><pre> let () =</pre></td><td class="correct"><pre> let () =</pre></td></tr>
<tr><td class="linenum">159</td><td class="correct"><pre> ()</pre></td><td class="correct"><pre> ()</pre></td></tr>
<tr><td class="linenum">160</td><td class="correct"><pre>end</pre></td><td class="correct"><pre>end</pre></td></tr>
<tr><td class="linenum">161</td><td class="correct"><pre></pre></td><td class="correct"><pre></pre></td></tr>
<tr><td class="linenum">162</td><td class="correct"><pre></pre></td><td class="correct"><pre></pre></td></tr>
<tr><td class="linenum">163</td><td class="correct"><pre></pre></td><td class="correct"><pre></pre></td></tr>
<tr><td class="linenum">164</td><td class="correct"><pre>val f : foo : int -></pre></td><td class="correct"><pre>val f : foo : int -></pre></td></tr>
<tr><td class="linenum">165</td><td class="correct"><pre> -> bar_snoo : a b</pre></td><td class="correct"><pre> -> bar_snoo : a b</pre></td></tr>
<tr><td class="linenum">166</td><td class="different"><pre>··(*·this·comment·is·in·the·wrong·place·*)</pre></td><td class="different"><pre>················(*·this·comment·is·in·the·wrong·place·*)</pre></td></tr>
<tr><td class="linenum">167</td><td class="correct"><pre> -> unit</pre></td><td class="correct"><pre> -> unit</pre></td></tr>
<tr><td class="linenum">168</td><td class="correct"><pre></pre></td><td class="correct"><pre></pre></td></tr>
<tr><td class="linenum">169</td><td class="correct"><pre>val f : foo : int -></pre></td><td class="correct"><pre>val f : foo : int -></pre></td></tr>
<tr><td class="linenum">170</td><td class="correct"><pre> -> bar_snoo : a</pre></td><td class="correct"><pre> -> bar_snoo : a</pre></td></tr>
<tr><td class="linenum">171</td><td class="correct"><pre> (* this comment is in the right place [under discussion --pszilagyi] *)</pre></td><td class="correct"><pre> (* this comment is in the right place [under discussion --pszilagyi] *)</pre></td></tr>
<tr><td class="linenum">172</td><td class="correct"><pre> -> unit</pre></td><td class="correct"><pre> -> unit</pre></td></tr>
<tr><td class="linenum">173</td><td class="correct"><pre></pre></td><td class="correct"><pre></pre></td></tr>
<tr><td class="linenum">174</td><td class="correct"><pre>(* The only difference is the type "a b" instead of "a" for the labeled value</pre></td><td class="correct"><pre>(* The only difference is the type "a b" instead of "a" for the labeled value</pre></td></tr>
<tr><td class="linenum">175</td><td class="correct"><pre> bar_snoo. *)</pre></td><td class="correct"><pre> bar_snoo. *)</pre></td></tr>
</table>
</div>
<div>
<h2>Differences in js-fun.ml</h2>
<table>
<tr><th><th>Expected<th>Ocp-indent output</tr>
<tr><td class="linenum">0</td><td class="correct"><pre>let _ =</pre></td><td class="correct"><pre>let _ =</pre></td></tr>
<tr><td class="linenum">1</td><td class="correct"><pre> [f (fun x -></pre></td><td class="correct"><pre> [f (fun x -></pre></td></tr>
<tr><td class="linenum">2</td><td class="correct"><pre> x);</pre></td><td class="correct"><pre> x);</pre></td></tr>
<tr><td class="linenum">3</td><td class="correct"><pre> f (fun x -></pre></td><td class="correct"><pre> f (fun x -></pre></td></tr>
<tr><td class="linenum">4</td><td class="correct"><pre> x);</pre></td><td class="correct"><pre> x);</pre></td></tr>
<tr><td class="linenum">5</td><td class="correct"><pre> f (fun x -></pre></td><td class="correct"><pre> f (fun x -></pre></td></tr>
<tr><td class="linenum">6</td><td class="correct"><pre> x);</pre></td><td class="correct"><pre> x);</pre></td></tr>
<tr><td class="linenum">7</td><td class="correct"><pre> ]</pre></td><td class="correct"><pre> ]</pre></td></tr>
<tr><td class="linenum">8</td><td class="correct"><pre>;;</pre></td><td class="correct"><pre>;;</pre></td></tr>
<tr><td class="linenum">9</td><td class="correct"><pre></pre></td><td class="correct"><pre></pre></td></tr>
<tr><td class="linenum">10</td><td class="correct"><pre>let _ =</pre></td><td class="correct"><pre>let _ =</pre></td></tr>
<tr><td class="linenum">11</td><td class="correct"><pre> x</pre></td><td class="correct"><pre> x</pre></td></tr>
<tr><td class="linenum">12</td><td class="correct"><pre> >>= fun x -></pre></td><td class="correct"><pre> >>= fun x -></pre></td></tr>
<tr><td class="linenum">13</td><td class="correct"><pre> (try x with _ -> ())</pre></td><td class="correct"><pre> (try x with _ -> ())</pre></td></tr>
<tr><td class="linenum">14</td><td class="correct"><pre> >>= fun x -></pre></td><td class="correct"><pre> >>= fun x -></pre></td></tr>
<tr><td class="linenum">15</td><td class="correct"><pre> try x with _ -> ()</pre></td><td class="correct"><pre> try x with _ -> ()</pre></td></tr>
<tr><td class="linenum">16</td><td class="correct"><pre> >>= fun x -></pre></td><td class="correct"><pre> >>= fun x -></pre></td></tr>
<tr><td class="linenum">17</td><td class="correct"><pre> x</pre></td><td class="correct"><pre> x</pre></td></tr>
<tr><td class="linenum">18</td><td class="correct"><pre>;;</pre></td><td class="correct"><pre>;;</pre></td></tr>
<tr><td class="linenum">19</td><td class="correct"><pre></pre></td><td class="correct"><pre></pre></td></tr>
<tr><td class="linenum">20</td><td class="correct"><pre>(* yminsky *)</pre></td><td class="correct"><pre>(* yminsky *)</pre></td></tr>
<tr><td class="linenum">21</td><td class="correct"><pre>let () =</pre></td><td class="correct"><pre>let () =</pre></td></tr>
<tr><td class="linenum">22</td><td class="correct"><pre> expr</pre></td><td class="correct"><pre> expr</pre></td></tr>
<tr><td class="linenum">23</td><td class="correct"><pre> >>| function</pre></td><td class="correct"><pre> >>| function</pre></td></tr>
<tr><td class="linenum">24</td><td class="different"><pre>··|·x·->·3</pre></td><td class="different"><pre>····|·x·->·3</pre></td></tr>
<tr><td class="linenum">25</td><td class="different"><pre>··|·y·->·4</pre></td><td class="different"><pre>····|·y·->·4</pre></td></tr>
<tr><td class="linenum">26</td><td class="correct"><pre>;;</pre></td><td class="correct"><pre>;;</pre></td></tr>
<tr><td class="linenum">27</td><td class="correct"><pre></pre></td><td class="correct"><pre></pre></td></tr>
<tr><td class="linenum">28</td><td class="correct"><pre>let () =</pre></td><td class="correct"><pre>let () =</pre></td></tr>
<tr><td class="linenum">29</td><td class="correct"><pre> expr</pre></td><td class="correct"><pre> expr</pre></td></tr>
<tr><td class="linenum">30</td><td class="correct"><pre> >>| fun z -> match z with</pre></td><td class="correct"><pre> >>| fun z -> match z with</pre></td></tr>
<tr><td class="linenum">31</td><td class="correct"><pre> | x -> 3</pre></td><td class="correct"><pre> | x -> 3</pre></td></tr>
<tr><td class="linenum">32</td><td class="correct"><pre> | y -> 4</pre></td><td class="correct"><pre> | y -> 4</pre></td></tr>
<tr><td class="linenum">33</td><td class="correct"><pre>;;</pre></td><td class="correct"><pre>;;</pre></td></tr>
<tr><td class="linenum">34</td><td class="correct"><pre></pre></td><td class="correct"><pre></pre></td></tr>
<tr><td class="linenum">35</td><td class="correct"><pre>let () =</pre></td><td class="correct"><pre>let () =</pre></td></tr>
<tr><td class="linenum">36</td><td class="correct"><pre> expr</pre></td><td class="correct"><pre> expr</pre></td></tr>
<tr><td class="linenum">37</td><td class="correct"><pre> >>| fun z -> function</pre></td><td class="correct"><pre> >>| fun z -> function</pre></td></tr>
<tr><td class="linenum">38</td><td class="correct"><pre> | x -> 3</pre></td><td class="correct"><pre> | x -> 3</pre></td></tr>
<tr><td class="linenum">39</td><td class="correct"><pre> | y -> 4</pre></td><td class="correct"><pre> | y -> 4</pre></td></tr>
<tr><td class="linenum">40</td><td class="correct"><pre>;;</pre></td><td class="correct"><pre>;;</pre></td></tr>
</table>
</div>
<div>
<h2>Differences in js-functor.ml</h2>
<table>
<tr><th><th>Expected<th>Ocp-indent output</tr>
<tr><td class="linenum">0</td><td class="correct"><pre>module M =</pre></td><td class="correct"><pre>module M =</pre></td></tr>
<tr><td class="linenum">1</td><td class="correct"><pre> Foo (G)</pre></td><td class="correct"><pre> Foo (G)</pre></td></tr>
<tr><td class="linenum">2</td><td class="correct"><pre> (H)</pre></td><td class="correct"><pre> (H)</pre></td></tr>
<tr><td class="linenum">3</td><td class="correct"><pre></pre></td><td class="correct"><pre></pre></td></tr>
<tr><td class="linenum">4</td><td class="correct"><pre>module M =</pre></td><td class="correct"><pre>module M =</pre></td></tr>
<tr><td class="linenum">5</td><td class="correct"><pre> Foo</pre></td><td class="correct"><pre> Foo</pre></td></tr>
<tr><td class="linenum">6</td><td class="correct"><pre> (G)</pre></td><td class="correct"><pre> (G)</pre></td></tr>
<tr><td class="linenum">7</td><td class="correct"><pre> (struct</pre></td><td class="correct"><pre> (struct</pre></td></tr>
<tr><td class="linenum">8</td><td class="correct"><pre> let x</pre></td><td class="correct"><pre> let x</pre></td></tr>
<tr><td class="linenum">9</td><td class="correct"><pre> end)</pre></td><td class="correct"><pre> end)</pre></td></tr>
<tr><td class="linenum">10</td><td class="correct"><pre> (H)</pre></td><td class="correct"><pre> (H)</pre></td></tr>
<tr><td class="linenum">11</td><td class="correct"><pre></pre></td><td class="correct"><pre></pre></td></tr>
<tr><td class="linenum">12</td><td class="correct"><pre>(* CR pszilagyi: To me, this looks fine as it is. The rule seems fine as "indent</pre></td><td class="correct"><pre>(* CR pszilagyi: To me, this looks fine as it is. The rule seems fine as "indent</pre></td></tr>
<tr><td class="linenum">13</td><td class="correct"><pre> arguments by 2". To illustrate, with a case where the functor name is longer: *)</pre></td><td class="correct"><pre> arguments by 2". To illustrate, with a case where the functor name is longer: *)</pre></td></tr>
<tr><td class="linenum">14</td><td class="correct"><pre>module M =</pre></td><td class="correct"><pre>module M =</pre></td></tr>
<tr><td class="linenum">15</td><td class="correct"><pre> Functor (G)</pre></td><td class="correct"><pre> Functor (G)</pre></td></tr>
<tr><td class="linenum">16</td><td class="correct"><pre> (H)</pre></td><td class="correct"><pre> (H)</pre></td></tr>
<tr><td class="linenum">17</td><td class="correct"><pre> (I)</pre></td><td class="correct"><pre> (I)</pre></td></tr>
<tr><td class="linenum">18</td><td class="correct"><pre></pre></td><td class="correct"><pre></pre></td></tr>
<tr><td class="linenum">19</td><td class="correct"><pre></pre></td><td class="correct"><pre></pre></td></tr>
<tr><td class="linenum">20</td><td class="correct"><pre></pre></td><td class="correct"><pre></pre></td></tr>
<tr><td class="linenum">21</td><td class="correct"><pre>(* sweeks *)</pre></td><td class="correct"><pre>(* sweeks *)</pre></td></tr>
<tr><td class="linenum">22</td><td class="correct"><pre></pre></td><td class="correct"><pre></pre></td></tr>
<tr><td class="linenum">23</td><td class="correct"><pre>include Foo (struct</pre></td><td class="correct"><pre>include Foo (struct</pre></td></tr>
<tr><td class="linenum">24</td><td class="different"><pre>····let·x</pre></td><td class="different"><pre>··let·x</pre></td></tr>
<tr><td class="linenum">25</td><td class="different"><pre>··end)·(struct</pre></td><td class="different"><pre>end)·(struct</pre></td></tr>
<tr><td class="linenum">26</td><td class="different"><pre>····let·y</pre></td><td class="different"><pre>··let·y</pre></td></tr>
<tr><td class="linenum">27</td><td class="different"><pre>··end)</pre></td><td class="different"><pre>end)</pre></td></tr>
<tr><td class="linenum">28</td><td class="correct"><pre></pre></td><td class="correct"><pre></pre></td></tr>
<tr><td class="linenum">29</td><td class="correct"><pre>include</pre></td><td class="correct"><pre>include</pre></td></tr>
<tr><td class="linenum">30</td><td class="correct"><pre> Foo (struct</pre></td><td class="correct"><pre> Foo (struct</pre></td></tr>
<tr><td class="linenum">31</td><td class="correct"><pre> let x</pre></td><td class="correct"><pre> let x</pre></td></tr>
<tr><td class="linenum">32</td><td class="correct"><pre> end) (struct</pre></td><td class="correct"><pre> end) (struct</pre></td></tr>
<tr><td class="linenum">33</td><td class="correct"><pre> let y</pre></td><td class="correct"><pre> let y</pre></td></tr>
<tr><td class="linenum">34</td><td class="correct"><pre> end)</pre></td><td class="correct"><pre> end)</pre></td></tr>
<tr><td class="linenum">35</td><td class="correct"><pre></pre></td><td class="correct"><pre></pre></td></tr>
<tr><td class="linenum">36</td><td class="correct"><pre>module M =</pre></td><td class="correct"><pre>module M =</pre></td></tr>
<tr><td class="linenum">37</td><td class="correct"><pre> Foo (struct</pre></td><td class="correct"><pre> Foo (struct</pre></td></tr>
<tr><td class="linenum">38</td><td class="correct"><pre> let x</pre></td><td class="correct"><pre> let x</pre></td></tr>
<tr><td class="linenum">39</td><td class="correct"><pre> end) (struct</pre></td><td class="correct"><pre> end) (struct</pre></td></tr>
<tr><td class="linenum">40</td><td class="correct"><pre> let y</pre></td><td class="correct"><pre> let y</pre></td></tr>
<tr><td class="linenum">41</td><td class="correct"><pre> end)</pre></td><td class="correct"><pre> end)</pre></td></tr>
<tr><td class="linenum">42</td><td class="correct"><pre></pre></td><td class="correct"><pre></pre></td></tr>
<tr><td class="linenum">43</td><td class="correct"><pre>module M : S =</pre></td><td class="correct"><pre>module M : S =</pre></td></tr>
<tr><td class="linenum">44</td><td class="correct"><pre> Make (M)</pre></td><td class="correct"><pre> Make (M)</pre></td></tr>
<tr><td class="linenum">45</td><td class="correct"><pre>module M : S with type t := int =</pre></td><td class="correct"><pre>module M : S with type t := int =</pre></td></tr>
<tr><td class="linenum">46</td><td class="correct"><pre> Make (M)</pre></td><td class="correct"><pre> Make (M)</pre></td></tr>
</table>
</div>
<div>
<h2>Differences in js-record.ml</h2>
<table>
<tr><th><th>Expected<th>Ocp-indent output</tr>
<tr><td class="linenum">0</td><td class="correct"><pre>type x =</pre></td><td class="correct"><pre>type x =</pre></td></tr>
<tr><td class="linenum">1</td><td class="correct"><pre> { foo : int</pre></td><td class="correct"><pre> { foo : int</pre></td></tr>
<tr><td class="linenum">2</td><td class="correct"><pre> ; bar : int</pre></td><td class="correct"><pre> ; bar : int</pre></td></tr>
<tr><td class="linenum">3</td><td class="correct"><pre> }</pre></td><td class="correct"><pre> }</pre></td></tr>
<tr><td class="linenum">4</td><td class="correct"><pre></pre></td><td class="correct"><pre></pre></td></tr>
<tr><td class="linenum">5</td><td class="correct"><pre>let x =</pre></td><td class="correct"><pre>let x =</pre></td></tr>
<tr><td class="linenum">6</td><td class="correct"><pre> { x with</pre></td><td class="correct"><pre> { x with</pre></td></tr>
<tr><td class="linenum">7</td><td class="correct"><pre> foo = 3</pre></td><td class="correct"><pre> foo = 3</pre></td></tr>
<tr><td class="linenum">8</td><td class="correct"><pre> ; bar = 5</pre></td><td class="correct"><pre> ; bar = 5</pre></td></tr>
<tr><td class="linenum">9</td><td class="correct"><pre> }</pre></td><td class="correct"><pre> }</pre></td></tr>
<tr><td class="linenum">10</td><td class="correct"><pre></pre></td><td class="correct"><pre></pre></td></tr>
<tr><td class="linenum">11</td><td class="correct"><pre>let x =</pre></td><td class="correct"><pre>let x =</pre></td></tr>
<tr><td class="linenum">12</td><td class="correct"><pre> { (* blah blah blah *)</pre></td><td class="correct"><pre> { (* blah blah blah *)</pre></td></tr>
<tr><td class="linenum">13</td><td class="correct"><pre> foo = 3</pre></td><td class="correct"><pre> foo = 3</pre></td></tr>
<tr><td class="linenum">14</td><td class="correct"><pre> ; bar = 5</pre></td><td class="correct"><pre> ; bar = 5</pre></td></tr>
<tr><td class="linenum">15</td><td class="correct"><pre> }</pre></td><td class="correct"><pre> }</pre></td></tr>
<tr><td class="linenum">16</td><td class="correct"><pre>;;</pre></td><td class="correct"><pre>;;</pre></td></tr>
<tr><td class="linenum">17</td><td class="correct"><pre></pre></td><td class="correct"><pre></pre></td></tr>
<tr><td class="linenum">18</td><td class="correct"><pre>let x =</pre></td><td class="correct"><pre>let x =</pre></td></tr>
<tr><td class="linenum">19</td><td class="correct"><pre> [{ x with</pre></td><td class="correct"><pre> [{ x with</pre></td></tr>
<tr><td class="linenum">20</td><td class="correct"><pre> foo = 3</pre></td><td class="correct"><pre> foo = 3</pre></td></tr>
<tr><td class="linenum">21</td><td class="correct"><pre> ; bar = 5</pre></td><td class="correct"><pre> ; bar = 5</pre></td></tr>
<tr><td class="linenum">22</td><td class="correct"><pre> }]</pre></td><td class="correct"><pre> }]</pre></td></tr>
<tr><td class="linenum">23</td><td class="correct"><pre></pre></td><td class="correct"><pre></pre></td></tr>
<tr><td class="linenum">24</td><td class="correct"><pre>let x =</pre></td><td class="correct"><pre>let x =</pre></td></tr>
<tr><td class="linenum">25</td><td class="correct"><pre> [{ (* blah blah blah *)</pre></td><td class="correct"><pre> [{ (* blah blah blah *)</pre></td></tr>
<tr><td class="linenum">26</td><td class="correct"><pre> foo = 3</pre></td><td class="correct"><pre> foo = 3</pre></td></tr>
<tr><td class="linenum">27</td><td class="correct"><pre> ; bar = 5</pre></td><td class="correct"><pre> ; bar = 5</pre></td></tr>
<tr><td class="linenum">28</td><td class="correct"><pre> }]</pre></td><td class="correct"><pre> }]</pre></td></tr>
<tr><td class="linenum">29</td><td class="correct"><pre>;;</pre></td><td class="correct"><pre>;;</pre></td></tr>
<tr><td class="linenum">30</td><td class="correct"><pre></pre></td><td class="correct"><pre></pre></td></tr>
<tr><td class="linenum">31</td><td class="correct"><pre>let x =</pre></td><td class="correct"><pre>let x =</pre></td></tr>
<tr><td class="linenum">32</td><td class="correct"><pre> { M.x with</pre></td><td class="correct"><pre> { M.x with</pre></td></tr>
<tr><td class="linenum">33</td><td class="correct"><pre> M.</pre></td><td class="correct"><pre> M.</pre></td></tr>
<tr><td class="linenum">34</td><td class="different"><pre>····foo·=·3</pre></td><td class="different"><pre>······foo·=·3</pre></td></tr>
<tr><td class="linenum">35</td><td class="correct"><pre> }</pre></td><td class="correct"><pre> }</pre></td></tr>
<tr><td class="linenum">36</td><td class="correct"><pre>;;</pre></td><td class="correct"><pre>;;</pre></td></tr>
<tr><td class="linenum">37</td><td class="correct"><pre></pre></td><td class="correct"><pre></pre></td></tr>
<tr><td class="linenum">38</td><td class="correct"><pre>let x =</pre></td><td class="correct"><pre>let x =</pre></td></tr>
<tr><td class="linenum">39</td><td class="correct"><pre> { x with</pre></td><td class="correct"><pre> { x with</pre></td></tr>
<tr><td class="linenum">40</td><td class="correct"><pre> M.</pre></td><td class="correct"><pre> M.</pre></td></tr>
<tr><td class="linenum">41</td><td class="different"><pre>····foo·=·3</pre></td><td class="different"><pre>······foo·=·3</pre></td></tr>
<tr><td class="linenum">42</td><td class="correct"><pre> }</pre></td><td class="correct"><pre> }</pre></td></tr>
<tr><td class="linenum">43</td><td class="correct"><pre>;;</pre></td><td class="correct"><pre>;;</pre></td></tr>
<tr><td class="linenum">44</td><td class="correct"><pre></pre></td><td class="correct"><pre></pre></td></tr>
<tr><td class="linenum">45</td><td class="correct"><pre>let x =</pre></td><td class="correct"><pre>let x =</pre></td></tr>
<tr><td class="linenum">46</td><td class="correct"><pre> { M.</pre></td><td class="correct"><pre> { M.</pre></td></tr>
<tr><td class="linenum">47</td><td class="correct"><pre> foo = 3</pre></td><td class="correct"><pre> foo = 3</pre></td></tr>
<tr><td class="linenum">48</td><td class="correct"><pre> }</pre></td><td class="correct"><pre> }</pre></td></tr>
<tr><td class="linenum">49</td><td class="correct"><pre>;;</pre></td><td class="correct"><pre>;;</pre></td></tr>
</table>
</div>
<div>
<h2>Differences in js-type.ml</h2>
<table>
<tr><th><th>Expected<th>Ocp-indent output</tr>
<tr><td class="linenum">0</td><td class="correct"><pre>(* These tests incorporate several subtle and different indentation ideas.</pre></td><td class="correct"><pre>(* These tests incorporate several subtle and different indentation ideas.</pre></td></tr>
<tr><td class="linenum">1</td><td class="correct"><pre> Please consider this only a proposal for discussion, for now.</pre></td><td class="correct"><pre> Please consider this only a proposal for discussion, for now.</pre></td></tr>
<tr><td class="linenum">2</td><td class="correct"><pre></pre></td><td class="correct"><pre></pre></td></tr>
<tr><td class="linenum">3</td><td class="correct"><pre> First, notice the display treatment of "(,)" tuples, analogous to "[;]"</pre></td><td class="correct"><pre> First, notice the display treatment of "(,)" tuples, analogous to "[;]"</pre></td></tr>
<tr><td class="linenum">4</td><td class="correct"><pre> lists. While "(,)" is an intensional combination of "()" and ",", unlike</pre></td><td class="correct"><pre> lists. While "(,)" is an intensional combination of "()" and ",", unlike</pre></td></tr>
<tr><td class="linenum">5</td><td class="correct"><pre> "[;]" lists, we hope isn't too big a departure. A bunch of value expression</pre></td><td class="correct"><pre> "[;]" lists, we hope isn't too big a departure. A bunch of value expression</pre></td></tr>
<tr><td class="linenum">6</td><td class="correct"><pre> analogies are included, some of which change the indentation of value</pre></td><td class="correct"><pre> analogies are included, some of which change the indentation of value</pre></td></tr>
<tr><td class="linenum">7</td><td class="correct"><pre> expressions, but are consistent with the proposed type indentation, and</pre></td><td class="correct"><pre> expressions, but are consistent with the proposed type indentation, and</pre></td></tr>
<tr><td class="linenum">8</td><td class="correct"><pre> considered part of the whole proposal. It may be more feasible to implement</pre></td><td class="correct"><pre> considered part of the whole proposal. It may be more feasible to implement</pre></td></tr>
<tr><td class="linenum">9</td><td class="correct"><pre> this part first, separately.</pre></td><td class="correct"><pre> this part first, separately.</pre></td></tr>
<tr><td class="linenum">10</td><td class="correct"><pre></pre></td><td class="correct"><pre></pre></td></tr>
<tr><td class="linenum">11</td><td class="correct"><pre> Second, and more divergent, the proposed indentation of function types is</pre></td><td class="correct"><pre> Second, and more divergent, the proposed indentation of function types is</pre></td></tr>
<tr><td class="linenum">12</td><td class="correct"><pre> based on the idea of aligning the arguments, even the first argument, even</pre></td><td class="correct"><pre> based on the idea of aligning the arguments, even the first argument, even</pre></td></tr>
<tr><td class="linenum">13</td><td class="correct"><pre> where that means automatically inserting spaces within lines. This applies</pre></td><td class="correct"><pre> where that means automatically inserting spaces within lines. This applies</pre></td></tr>
<tr><td class="linenum">14</td><td class="correct"><pre> to the extra spaces in ":__unit" and "(____Config.Network.t" below.</pre></td><td class="correct"><pre> to the extra spaces in ":__unit" and "(____Config.Network.t" below.</pre></td></tr>
<tr><td class="linenum">15</td><td class="correct"><pre></pre></td><td class="correct"><pre></pre></td></tr>
<tr><td class="linenum">16</td><td class="correct"><pre> The proposal also includes indenting "->" in the circumstances below relative</pre></td><td class="correct"><pre> The proposal also includes indenting "->" in the circumstances below relative</pre></td></tr>
<tr><td class="linenum">17</td><td class="correct"><pre> to the enclosing "()", by two spaces. In a sense, this happens first, and</pre></td><td class="correct"><pre> to the enclosing "()", by two spaces. In a sense, this happens first, and</pre></td></tr>
<tr><td class="linenum">18</td><td class="correct"><pre> then the first argument is aligned accordingly. So, there's no manual</pre></td><td class="correct"><pre> then the first argument is aligned accordingly. So, there's no manual</pre></td></tr>
<tr><td class="linenum">19</td><td class="correct"><pre> indentation or spacing below. *)</pre></td><td class="correct"><pre> indentation or spacing below. *)</pre></td></tr>
<tr><td class="linenum">20</td><td class="correct"><pre></pre></td><td class="correct"><pre></pre></td></tr>
<tr><td class="linenum">21</td><td class="correct"><pre></pre></td><td class="correct"><pre></pre></td></tr>
<tr><td class="linenum">22</td><td class="correct"><pre></pre></td><td class="correct"><pre></pre></td></tr>
<tr><td class="linenum">23</td><td class="correct"><pre>(* sweeks *)</pre></td><td class="correct"><pre>(* sweeks *)</pre></td></tr>
<tr><td class="linenum">24</td><td class="correct"><pre>val instances</pre></td><td class="correct"><pre>val instances</pre></td></tr>
<tr><td class="linenum">25</td><td class="correct"><pre> : unit</pre></td><td class="correct"><pre> : unit</pre></td></tr>
<tr><td class="linenum">26</td><td class="correct"><pre> -> ( Config.Network.t</pre></td><td class="correct"><pre> -> ( Config.Network.t</pre></td></tr>
<tr><td class="linenum">27</td><td class="different"><pre>·······->·(App.t·*·Config.instance·*·Config.app)·list</pre></td><td class="different"><pre>··········->·(App.t·*·Config.instance·*·Config.app)·list</pre></td></tr>
<tr><td class="linenum">28</td><td class="different"><pre>·······->·verbose:bool</pre></td><td class="different"><pre>··········->·verbose:bool</pre></td></tr>
<tr><td class="linenum">29</td><td class="different"><pre>·······->·'m</pre></td><td class="different"><pre>··········->·'m</pre></td></tr>
<tr><td class="linenum">30</td><td class="correct"><pre> , 'm</pre></td><td class="correct"><pre> , 'm</pre></td></tr>
<tr><td class="linenum">31</td><td class="correct"><pre> ) Command.Spec.t</pre></td><td class="correct"><pre> ) Command.Spec.t</pre></td></tr>
<tr><td class="linenum">32</td><td class="correct"><pre></pre></td><td class="correct"><pre></pre></td></tr>
<tr><td class="linenum">33</td><td class="correct"><pre>(* jmcarthur *)</pre></td><td class="correct"><pre>(* jmcarthur *)</pre></td></tr>
<tr><td class="linenum">34</td><td class="correct"><pre>val instances</pre></td><td class="correct"><pre>val instances</pre></td></tr>
<tr><td class="linenum">35</td><td class="correct"><pre> : unit</pre></td><td class="correct"><pre> : unit</pre></td></tr>
<tr><td class="linenum">36</td><td class="correct"><pre> -> ( Config.Network.t</pre></td><td class="correct"><pre> -> ( Config.Network.t</pre></td></tr>
<tr><td class="linenum">37</td><td class="different"><pre>·······->·(App.t·*·Config.instance·*·Config.app)·list</pre></td><td class="different"><pre>··········->·(App.t·*·Config.instance·*·Config.app)·list</pre></td></tr>
<tr><td class="linenum">38</td><td class="different"><pre>·······->·verbose:bool·->·'m</pre></td><td class="different"><pre>··········->·verbose:bool·->·'m</pre></td></tr>
<tr><td class="linenum">39</td><td class="correct"><pre> , 'm</pre></td><td class="correct"><pre> , 'm</pre></td></tr>
<tr><td class="linenum">40</td><td class="correct"><pre> ) Command.Spec.t</pre></td><td class="correct"><pre> ) Command.Spec.t</pre></td></tr>
<tr><td class="linenum">41</td><td class="correct"><pre></pre></td><td class="correct"><pre></pre></td></tr>
<tr><td class="linenum">42</td><td class="correct"><pre>(* pszilagyi: Here's, I believe, a representative alternative that uses</pre></td><td class="correct"><pre>(* pszilagyi: Here's, I believe, a representative alternative that uses</pre></td></tr>
<tr><td class="linenum">43</td><td class="correct"><pre> alignment to minimize vertical space. *)</pre></td><td class="correct"><pre> alignment to minimize vertical space. *)</pre></td></tr>
<tr><td class="linenum">44</td><td class="correct"><pre>val instances : unit -> ( Config.Network.t</pre></td><td class="correct"><pre>val instances : unit -> ( Config.Network.t</pre></td></tr>
<tr><td class="linenum">45</td><td class="different"><pre>··························->·(App.t·*·Config.instance·*·Config.app)·list</pre></td><td class="different"><pre>·····························->·(App.t·*·Config.instance·*·Config.app)·list</pre></td></tr>
<tr><td class="linenum">46</td><td class="different"><pre>··························->·verbose:bool·->·'m</pre></td><td class="different"><pre>·····························->·verbose:bool·->·'m</pre></td></tr>
<tr><td class="linenum">47</td><td class="correct"><pre> , 'm</pre></td><td class="correct"><pre> , 'm</pre></td></tr>
<tr><td class="linenum">48</td><td class="correct"><pre> ) Command.Spec.t</pre></td><td class="correct"><pre> ) Command.Spec.t</pre></td></tr>
<tr><td class="linenum">49</td><td class="correct"><pre></pre></td><td class="correct"><pre></pre></td></tr>
<tr><td class="linenum">50</td><td class="correct"><pre>(* a presumably analogous version with the arrows at ends of lines *)</pre></td><td class="correct"><pre>(* a presumably analogous version with the arrows at ends of lines *)</pre></td></tr>
<tr><td class="linenum">51</td><td class="correct"><pre>val instances : unit -> ( Config.Network.t -></pre></td><td class="correct"><pre>val instances : unit -> ( Config.Network.t -></pre></td></tr>
<tr><td class="linenum">52</td><td class="correct"><pre> (App.t * Config.instance * Config.app) list -></pre></td><td class="correct"><pre> (App.t * Config.instance * Config.app) list -></pre></td></tr>
<tr><td class="linenum">53</td><td class="correct"><pre> verbose:bool -></pre></td><td class="correct"><pre> verbose:bool -></pre></td></tr>
<tr><td class="linenum">54</td><td class="correct"><pre> 'm</pre></td><td class="correct"><pre> 'm</pre></td></tr>
<tr><td class="linenum">55</td><td class="correct"><pre> , 'm</pre></td><td class="correct"><pre> , 'm</pre></td></tr>
<tr><td class="linenum">56</td><td class="correct"><pre> ) Command.Spec.t</pre></td><td class="correct"><pre> ) Command.Spec.t</pre></td></tr>
<tr><td class="linenum">57</td><td class="correct"><pre></pre></td><td class="correct"><pre></pre></td></tr>
<tr><td class="linenum">58</td><td class="correct"><pre>(* presumed analogs with stars *)</pre></td><td class="correct"><pre>(* presumed analogs with stars *)</pre></td></tr>
<tr><td class="linenum">59</td><td class="correct"><pre>val instances : unit * ( Config.Network.t *</pre></td><td class="correct"><pre>val instances : unit * ( Config.Network.t *</pre></td></tr>
<tr><td class="linenum">60</td><td class="different"><pre>·························(App.t·*·Config.instance·*·Config.app)·list·*</pre></td><td class="different"><pre>···························(App.t·*·Config.instance·*·Config.app)·list·*</pre></td></tr>
<tr><td class="linenum">61</td><td class="different"><pre>·························bool·*</pre></td><td class="different"><pre>···························bool·*</pre></td></tr>
<tr><td class="linenum">62</td><td class="different"><pre>·························'m</pre></td><td class="different"><pre>···························'m</pre></td></tr>
<tr><td class="linenum">63</td><td class="correct"><pre> , 'm</pre></td><td class="correct"><pre> , 'm</pre></td></tr>
<tr><td class="linenum">64</td><td class="correct"><pre> ) Command.Spec.t</pre></td><td class="correct"><pre> ) Command.Spec.t</pre></td></tr>
<tr><td class="linenum">65</td><td class="correct"><pre>val instances : unit * ( Config.Network.t</pre></td><td class="correct"><pre>val instances : unit * ( Config.Network.t</pre></td></tr>
<tr><td class="linenum">66</td><td class="different"><pre>·························*·(App.t·*·Config.instance·*·Config.app)·list</pre></td><td class="different"><pre>···························*·(App.t·*·Config.instance·*·Config.app)·list</pre></td></tr>
<tr><td class="linenum">67</td><td class="different"><pre>·························*·bool</pre></td><td class="different"><pre>···························*·bool</pre></td></tr>
<tr><td class="linenum">68</td><td class="different"><pre>·························*·'m</pre></td><td class="different"><pre>···························*·'m</pre></td></tr>
<tr><td class="linenum">69</td><td class="correct"><pre> , 'm</pre></td><td class="correct"><pre> , 'm</pre></td></tr>
<tr><td class="linenum">70</td><td class="correct"><pre> ) Command.Spec.t</pre></td><td class="correct"><pre> ) Command.Spec.t</pre></td></tr>
<tr><td class="linenum">71</td><td class="correct"><pre></pre></td><td class="correct"><pre></pre></td></tr>
<tr><td class="linenum">72</td><td class="correct"><pre></pre></td><td class="correct"><pre></pre></td></tr>
<tr><td class="linenum">73</td><td class="correct"><pre></pre></td><td class="correct"><pre></pre></td></tr>
<tr><td class="linenum">74</td><td class="correct"><pre>(* analogous value expressions, analogous to lists, some different from now *)</pre></td><td class="correct"><pre>(* analogous value expressions, analogous to lists, some different from now *)</pre></td></tr>
<tr><td class="linenum">75</td><td class="correct"><pre>let _ = ( x</pre></td><td class="correct"><pre>let _ = ( x</pre></td></tr>
<tr><td class="linenum">76</td><td class="correct"><pre> , y</pre></td><td class="correct"><pre> , y</pre></td></tr>
<tr><td class="linenum">77</td><td class="correct"><pre> )</pre></td><td class="correct"><pre> )</pre></td></tr>
<tr><td class="linenum">78</td><td class="correct"><pre>let _ = [ x</pre></td><td class="correct"><pre>let _ = [ x</pre></td></tr>
<tr><td class="linenum">79</td><td class="correct"><pre> ; y</pre></td><td class="correct"><pre> ; y</pre></td></tr>
<tr><td class="linenum">80</td><td class="correct"><pre> ]</pre></td><td class="correct"><pre> ]</pre></td></tr>
<tr><td class="linenum">81</td><td class="correct"><pre>let _ = ( x,</pre></td><td class="correct"><pre>let _ = ( x,</pre></td></tr>
<tr><td class="linenum">82</td><td class="correct"><pre> y</pre></td><td class="correct"><pre> y</pre></td></tr>
<tr><td class="linenum">83</td><td class="correct"><pre> )</pre></td><td class="correct"><pre> )</pre></td></tr>
<tr><td class="linenum">84</td><td class="correct"><pre>let _ = [ x;</pre></td><td class="correct"><pre>let _ = [ x;</pre></td></tr>
<tr><td class="linenum">85</td><td class="correct"><pre> y</pre></td><td class="correct"><pre> y</pre></td></tr>
<tr><td class="linenum">86</td><td class="correct"><pre> ]</pre></td><td class="correct"><pre> ]</pre></td></tr>
<tr><td class="linenum">87</td><td class="correct"><pre>let _ =</pre></td><td class="correct"><pre>let _ =</pre></td></tr>
<tr><td class="linenum">88</td><td class="correct"><pre> ( x</pre></td><td class="correct"><pre> ( x</pre></td></tr>
<tr><td class="linenum">89</td><td class="correct"><pre> , y</pre></td><td class="correct"><pre> , y</pre></td></tr>
<tr><td class="linenum">90</td><td class="correct"><pre> )</pre></td><td class="correct"><pre> )</pre></td></tr>
<tr><td class="linenum">91</td><td class="correct"><pre>let _ =</pre></td><td class="correct"><pre>let _ =</pre></td></tr>
<tr><td class="linenum">92</td><td class="correct"><pre> ( x,</pre></td><td class="correct"><pre> ( x,</pre></td></tr>
<tr><td class="linenum">93</td><td class="correct"><pre> y</pre></td><td class="correct"><pre> y</pre></td></tr>
<tr><td class="linenum">94</td><td class="correct"><pre> )</pre></td><td class="correct"><pre> )</pre></td></tr>
<tr><td class="linenum">95</td><td class="correct"><pre>let _ =</pre></td><td class="correct"><pre>let _ =</pre></td></tr>
<tr><td class="linenum">96</td><td class="correct"><pre> (</pre></td><td class="correct"><pre> (</pre></td></tr>
<tr><td class="linenum">97</td><td class="correct"><pre> x</pre></td><td class="correct"><pre> x</pre></td></tr>
<tr><td class="linenum">98</td><td class="correct"><pre> , y</pre></td><td class="correct"><pre> , y</pre></td></tr>
<tr><td class="linenum">99</td><td class="correct"><pre> )</pre></td><td class="correct"><pre> )</pre></td></tr>
<tr><td class="linenum">100</td><td class="correct"><pre>let _ =</pre></td><td class="correct"><pre>let _ =</pre></td></tr>
<tr><td class="linenum">101</td><td class="correct"><pre> [</pre></td><td class="correct"><pre> [</pre></td></tr>
<tr><td class="linenum">102</td><td class="correct"><pre> x</pre></td><td class="correct"><pre> x</pre></td></tr>
<tr><td class="linenum">103</td><td class="correct"><pre> ; y</pre></td><td class="correct"><pre> ; y</pre></td></tr>
<tr><td class="linenum">104</td><td class="correct"><pre> ]</pre></td><td class="correct"><pre> ]</pre></td></tr>
<tr><td class="linenum">105</td><td class="correct"><pre>let _ = (</pre></td><td class="correct"><pre>let _ = (</pre></td></tr>
<tr><td class="linenum">106</td><td class="correct"><pre> x,</pre></td><td class="correct"><pre> x,</pre></td></tr>
<tr><td class="linenum">107</td><td class="correct"><pre> y</pre></td><td class="correct"><pre> y</pre></td></tr>
<tr><td class="linenum">108</td><td class="correct"><pre>)</pre></td><td class="correct"><pre>)</pre></td></tr>
<tr><td class="linenum">109</td><td class="correct"><pre>let _ = [</pre></td><td class="correct"><pre>let _ = [</pre></td></tr>
<tr><td class="linenum">110</td><td class="correct"><pre> x;</pre></td><td class="correct"><pre> x;</pre></td></tr>
<tr><td class="linenum">111</td><td class="correct"><pre> y</pre></td><td class="correct"><pre> y</pre></td></tr>
<tr><td class="linenum">112</td><td class="correct"><pre>]</pre></td><td class="correct"><pre>]</pre></td></tr>
<tr><td class="linenum">113</td><td class="correct"><pre>let _ = (</pre></td><td class="correct"><pre>let _ = (</pre></td></tr>
<tr><td class="linenum">114</td><td class="correct"><pre> x</pre></td><td class="correct"><pre> x</pre></td></tr>
<tr><td class="linenum">115</td><td class="correct"><pre>, y</pre></td><td class="correct"><pre>, y</pre></td></tr>
<tr><td class="linenum">116</td><td class="correct"><pre>)</pre></td><td class="correct"><pre>)</pre></td></tr>
<tr><td class="linenum">117</td><td class="correct"><pre>let _ = [</pre></td><td class="correct"><pre>let _ = [</pre></td></tr>
<tr><td class="linenum">118</td><td class="correct"><pre> x</pre></td><td class="correct"><pre> x</pre></td></tr>
<tr><td class="linenum">119</td><td class="correct"><pre>; y</pre></td><td class="correct"><pre>; y</pre></td></tr>
<tr><td class="linenum">120</td><td class="correct"><pre>]</pre></td><td class="correct"><pre>]</pre></td></tr>
</table>
</div>
</body>
</html>
Jump to Line
Something went wrong with that request. Please try again.