Skip to content
Browse files

merge

  • Loading branch information...
2 parents c603e6d + 43edd34 commit 9d25f05865f12994e3526b19cd64402b474f498a @pszilagyi pszilagyi committed Mar 13, 2013
View
8 CHANGELOG
@@ -1,3 +1,11 @@
+## 1.0.2
+* Supporting indentation of ocamldoc. In particular, code within
+ ocamldoc blocks {[...]} should be automatically indented
+* Fixed the emacs mode not to set the mark
+* A few new configuration options (strict_with, strict_comments, align_params)
+* A few tweaks and improvements (better empty line indent, etc.)
+* Bugfixes (#43, #47)
+
## 1.0.1
* Indentation of comments now follows ocamldoc conventions properly
* Partial indent adapts more closely to manual indentation
View
18 configure
@@ -1,6 +1,6 @@
#! /bin/sh
# Guess values for system-dependent variables and create Makefiles.
-# Generated by GNU Autoconf 2.69 for ocp-indent 1.0.1.
+# Generated by GNU Autoconf 2.69 for ocp-indent 1.0.2.
#
#
# Copyright (C) 1992-1996, 1998-2012 Free Software Foundation, Inc.
@@ -578,8 +578,8 @@ MAKEFLAGS=
# Identity of this package.
PACKAGE_NAME='ocp-indent'
PACKAGE_TARNAME='ocp-indent'
-PACKAGE_VERSION='1.0.1'
-PACKAGE_STRING='ocp-indent 1.0.1'
+PACKAGE_VERSION='1.0.2'
+PACKAGE_STRING='ocp-indent 1.0.2'
PACKAGE_BUGREPORT=''
PACKAGE_URL=''
@@ -1195,7 +1195,7 @@ if test "$ac_init_help" = "long"; then
# Omit some internal or obsolete options to make the list less imposing.
# This message is too long to be a string in the A/UX 3.1 sh.
cat <<_ACEOF
-\`configure' configures ocp-indent 1.0.1 to adapt to many kinds of systems.
+\`configure' configures ocp-indent 1.0.2 to adapt to many kinds of systems.
Usage: $0 [OPTION]... [VAR=VALUE]...
@@ -1256,7 +1256,7 @@ fi
if test -n "$ac_init_help"; then
case $ac_init_help in
- short | recursive ) echo "Configuration of ocp-indent 1.0.1:";;
+ short | recursive ) echo "Configuration of ocp-indent 1.0.2:";;
esac
cat <<\_ACEOF
@@ -1335,7 +1335,7 @@ fi
test -n "$ac_init_help" && exit $ac_status
if $ac_init_version; then
cat <<\_ACEOF
-ocp-indent configure 1.0.1
+ocp-indent configure 1.0.2
generated by GNU Autoconf 2.69
Copyright (C) 2012 Free Software Foundation, Inc.
@@ -1392,7 +1392,7 @@ cat >config.log <<_ACEOF
This file contains any messages produced by compilers while
running configure, to aid debugging if configure makes a mistake.
-It was created by ocp-indent $as_me 1.0.1, which was
+It was created by ocp-indent $as_me 1.0.2, which was
generated by GNU Autoconf 2.69. Invocation command line was
$ $0 $@
@@ -4079,7 +4079,7 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
# report actual input values of CONFIG_FILES etc. instead of their
# values after options handling.
ac_log="
-This file was extended by ocp-indent $as_me 1.0.1, which was
+This file was extended by ocp-indent $as_me 1.0.2, which was
generated by GNU Autoconf 2.69. Invocation command line was
CONFIG_FILES = $CONFIG_FILES
@@ -4132,7 +4132,7 @@ _ACEOF
cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
ac_cs_version="\\
-ocp-indent config.status 1.0.1
+ocp-indent config.status 1.0.2
configured by $0, generated by GNU Autoconf 2.69,
with options \\"\$ac_cs_config\\"
View
2 configure.ac
@@ -1,4 +1,4 @@
-AC_INIT(ocp-indent,1.0.1)
+AC_INIT(ocp-indent,1.0.2)
AC_COPYRIGHT(Copyright 2013 OcamlPro SAS)
AC_CONFIG_MACRO_DIR([m4])
View
12 src/indentBlock.ml
@@ -364,7 +364,7 @@ let op_prio_align_indent config =
| "|!" | "|>" -> prio_flatop,T,0
| _ -> 60,L,config.i_base)
| EQUAL | LESS | GREATER -> 60,L,config.i_base
- | INFIXOP1 _ -> 70,L,config.i_base
+ | INFIXOP1 _ -> 70,T,0
| COLONCOLON -> 80,L,config.i_base
| INFIXOP2 _ | PLUSDOT | PLUS | MINUSDOT | MINUS -> 90,L,config.i_base
| INFIXOP3 _ | STAR -> 100,L,config.i_base
@@ -443,7 +443,7 @@ let rec update_path config t stream tok =
(* change l to set the starting column of the expression *)
let pad = max 0 pad in
let l,pad =
- if pos = T then h.t + pad, 0
+ if pos = T then h.t, pad
else
(* set indent of the whole expr accoring to its parent *)
Path.l p + Path.pad p, pad
@@ -463,10 +463,14 @@ let rec update_path config t stream tok =
| Some({k=KExpr i}::_ as p) when i = prio_apply -> p
| Some({k=KExpr _; line}
:: {k=KArrow (KMatch|KTry); line=arrow_line}::_ as p)
- when line = arrow_line ->
+ when config.i_align_params = Auto
+ && line = arrow_line ->
(* Special case: switch to token-aligned (see test js-args) *)
extend (KExpr prio_apply) T p
- | Some p -> extend (KExpr prio_apply) L p
+ | Some p ->
+ extend (KExpr prio_apply)
+ (if config.i_align_params = Always then T else L)
+ p
| None -> assert false
in
p
View
30 src/indentConfig.ml
@@ -25,6 +25,7 @@ type t = {
i_strict_with: threechoices;
i_match_clause: int;
i_strict_comments: bool;
+ i_align_params: threechoices;
}
let default = {
@@ -35,19 +36,22 @@ let default = {
i_strict_with = Never;
i_match_clause = 2;
i_strict_comments = false;
+ i_align_params = Auto;
}
let presets = [
"apprentice",
{ i_base = 2; i_type = 4; i_in = 2;
i_with = 2; i_strict_with = Never; i_match_clause = 4;
- i_strict_comments = false };
+ i_strict_comments = false;
+ i_align_params = Always };
"normal",
default;
"JaneStreet",
{ i_base = 2; i_type = 2; i_in = 0;
i_with = 0; i_strict_with = Always; i_match_clause = 2;
- i_strict_comments = true };
+ i_strict_comments = true;
+ i_align_params = Always };
]
let threechoices_of_string = function
@@ -73,6 +77,7 @@ let set t var_name value =
{t with i_strict_with = if bool_of_string value then Always else Never}
| "match_clause" -> {t with i_match_clause = int_of_string value}
| "strict_comments" -> {t with i_strict_comments = bool_of_string value}
+ | "align_params" -> {t with i_align_params = threechoices_of_string value}
| _ -> raise (Invalid_argument var_name)
with
| Failure "int_of_string" ->
@@ -108,17 +113,23 @@ let help =
"Config syntax: <var>=<value>[,<var>=<value>...] or <preset>[,...]\n\
\n\
Indent configuration variables:\n\
- \ [variable] [default] [help]\n\
+ \n\
+ \ [variable] [default] [help]\n\
\ base %3d base indent\n\
\ type %3d indent of type definitions\n\
\ in %3d indent after 'let in'\n\
\ with %3d indent of match cases (before '|')\n\
- \ strict_with %-6s don't override 'with' when the match doesn't\n\
- \ start a line \
- (either 'always', 'never' or 'auto')\n\
+ \ strict_with % 6s%, don't override 'with' when the match doesn't \
+ start a \n\
+ \ line (either 'always', 'never' or 'auto')\n\
\ match_clause %3d indent inside match cases (after '->')\n\
- \ strict_comments %-5b if true, don't preserve indentation\
+ \ strict_comments % 6s%, if true, don't preserve indentation \
inside comments\n\
+ \ align_params % 6s%, align function parameters below the function\n\
+ \ instead of just indenting them one level \
+ further\n\
+ \ (if 'auto' do so only if just after \
+ a match arrow)\n\
\n\
Available configuration presets:%s\n\
\n\
@@ -129,8 +140,9 @@ let help =
default.i_with
(string_of_threechoices default.i_strict_with)
default.i_match_clause
- default.i_strict_comments
- (List.fold_left (fun s (name,_) -> s ^ " " ^ name) "" presets)
+ (string_of_bool default.i_strict_comments)
+ (string_of_threechoices default.i_align_params)
+ (String.concat ", " (List.map fst presets))
let default =
try
View
93 src/indentConfig.mli
@@ -1,6 +1,5 @@
(**************************************************************************)
(* *)
-(* Copyright 2011 Jun Furuse *)
(* Copyright 2013 OCamlPro *)
(* *)
(* All rights reserved. This file is distributed under the terms of *)
@@ -16,53 +15,69 @@
type threechoices = Always | Never | Auto
type t = {
- (* number of spaces used in all base cases, for example: {[
- let foo =
- ^^bar
- ]}
- default 2 *)
+ (** number of spaces used in all base cases, for example: {[
+ let foo =
+ ^^bar
+ ]}
+ default 2 *)
i_base: int;
- (* indent for type definitions: {[
- type t =
- ^^int
- ]}
- default 2 *)
+ (** indent for type definitions: {[
+ type t =
+ ^^int
+ ]}
+ default 2 *)
i_type: int;
- (* indent after [let in], unless followed by another [let]: {[
- let foo = () in
- ^^bar
- ]}
- default 0; beginners may prefer 2. *)
+ (** indent after [let in], unless followed by another [let]: {[
+ let foo = () in
+ ^^bar
+ ]}
+ default 0; beginners may prefer 2. *)
i_in: int;
- (* indent after [match/try with] or [function]: {[
- match foo with
- ^^| _ -> bar
- ]}
- default 0 *)
+ (** indent after [match/try with] or [function]: {[
+ match foo with
+ ^^| _ -> bar
+ ]}
+ default 0 *)
i_with: int;
- (* if [Never], match bars will be indented, superseding [i_with],
- whenever [match with] doesn't start its line. If [Auto], there are
- exceptions for constructs like [begin match with]. If [Never],
- [i_with] is always strictly respected.
- Eg, with [Never] and [i_with=0]:
- {[
- begin match foo with
- ^^| _ -> bar
- end
+ (** if [Never], match bars will be indented, superseding [i_with],
+ whenever [match with] doesn't start its line. If [Auto], there are
+ exceptions for constructs like [begin match with]. If [Never],
+ [i_with] is always strictly respected.
+ Eg, with [Never] and [i_with=0]: {[
+ begin match foo with
+ ^^| _ -> bar
+ end
]}
default is [Never] *)
i_strict_with: threechoices;
- (* indent for clauses inside a pattern-match: {[
- match foo with
- | _ ->
- ^^^^bar
- ]}
- default 2, which aligns the pattern and the expression *)
+ (** indent for clauses inside a pattern-match: {[
+ match foo with
+ | _ ->
+ ^^^^bar
+ ]}
+ default 2, which aligns the pattern and the expression *)
i_match_clause: int;
- (* if [false], indentation within comments will be preserved. If [true],
- their contents are forcefully aligned.
- default false *)
+ (** if [false], indentation within comments is preserved. If [true],
+ their contents are aligned with the first line. Lines starting with [*]
+ are always aligned.
+ default [false] *)
i_strict_comments: bool;
+ (** if [Never], function parameters are indented one level from the function.
+ if [Always], they are aligned relative to the function.
+ if [Auto], alignment is chosen over indentation in a few cases, e.g. after
+ match arrows.
+ For example, with [Auto] or [Always], you'll get: {[
+ match foo with
+ | _ -> some_fun
+ ^^parameter
+ ]}
+ While [Never] would yield: {[
+ match foo with
+ | _ -> some_fun
+ ^^parameter
+ ]}
+ default [Auto] *)
+ i_align_params: threechoices;
}
val help: string
View
8 tests/failing-output/js-args.ml
@@ -81,13 +81,13 @@ let () =
let () =
raise (Bug ("foo"
- (* In this and similar cases, we want the subsequent lines to
- align with the first expression. *)
- ^ "bar"))
+ (* In this and similar cases, we want the subsequent lines to
+ align with the first expression. *)
+ ^ "bar"))
(* Except in specific cases, we want the argument indented relative to the
function being called. (Exceptions include "fun" arguments where the line
ends with "->" and subsequent lines beginning with operators, like above.) *)
let () =
Some (Message_store.create s
- "herd-retransmitter" ~unlink:true Message_store.Message_size.Byte)
+ "herd-retransmitter" ~unlink:true Message_store.Message_size.Byte)
View
527 tests/failing.html
@@ -2,7 +2,7 @@
"http://www.w3.org/TR/REC-html40/loose.dtd">
<html>
<head>
- <title>Failing tests, ocp-indent version 1.0.1+48 (2013-03-08)</title>
+ <title>Failing tests, ocp-indent version 1.0.2 (2013-03-13)</title>
<style>
BODY { font-family: monospace; }
TABLE { border-collapse: collapse; border-spacing: 0px; margin: auto; }
@@ -22,529 +22,8 @@
</style>
</head>
<body>
-<h1>Failing tests, ocp-indent version 1.0.1+48 (2013-03-08)</h1>
+<h1>Failing tests, ocp-indent version 1.0.2 (2013-03-13)</h1>
<p>Left is expected result, right shows actual indentation by ocp-indent</p>
-<table>
-<tr><td width="70%">
-<table>
- <tr>
- <td class="modified">Modified line(s):&nbsp;</td>
- <td class="modified"><a href='#failing/js-args.ml_58'>58</a>&nbsp; <a href='#failing/js-args.ml_59'>59</a>&nbsp; <a href='#failing/js-args.ml_60'>60</a>&nbsp; <a href='#failing/js-args.ml_67'>67</a>&nbsp; </td>
- </tr>
- <tr>
- <td class="added">Added line(s):&nbsp;</td>
- <td class="added">None </td>
- </tr>
- <tr>
- <td class="removed">Removed line(s):&nbsp;</td>
- <td class="removed">None </td>
- </tr>
-</table>
-</td>
-<td width="30%">
-<font size="-2"><i>Generated by <a href="http://kirk.webfinish.com"><b>diff2html</b></a><br>
-&copy; 2009 Kirk Roybal, WebFinish<br>
-Python version by: Yves Bailly, MandrakeSoft S.A. 2001<br>
-<b>diff2html</b> is licensed under the <a href="http://www.gnu.org/copyleft/gpl.html">GNU GPL</a>.</i></font>
-</td></tr>
-</table>
-<hr/>
-<table>
- <tr>
- <th>&nbsp;</th>
- <th width="45%"><strong><big>failing/js-args.ml</big></strong></th>
- <th>&nbsp;</th>
- <th>&nbsp;</th>
- <th width="45%"><strong><big>failing-output/js-args.ml</big></strong></th>
- </tr>
- <tr>
- <td width="16">&nbsp;</td>
- <td>
- 67 lines<br/>
- 1305 bytes<br/>
- Last modified : 2013-03-08 10:11:27 <br>
- <hr/>
- </td>
- <td width="16">&nbsp;</td>
- <td width="16">&nbsp;</td>
- <td>
- 67 lines<br/>
- 1277 bytes<br/>
- Last modified : 2013-03-08 10:11:27 <br>
- <hr/>
- </td>
- </tr>
- <tr>
- <td class="linenum">1</td>
- <td class="normal">let () =</td>
- <td width="16">&nbsp;</td>
- <td class="linenum">1</td>
- <td class="normal">let () =</td>
- </tr>
- <tr>
- <td class="linenum">2</td>
- <td class="normal">&nbsp;&nbsp;foo.bar &lt;-</td>
- <td width="16">&nbsp;</td>
- <td class="linenum">2</td>
- <td class="normal">&nbsp;&nbsp;foo.bar &lt;-</td>
- </tr>
- <tr>
- <td class="linenum">3</td>
- <td class="normal">&nbsp;&nbsp;&nbsp;&nbsp;f x</td>
- <td width="16">&nbsp;</td>
- <td class="linenum">3</td>
- <td class="normal">&nbsp;&nbsp;&nbsp;&nbsp;f x</td>
- </tr>
- <tr>
- <td class="linenum">4</td>
- <td class="normal">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;y z</td>
- <td width="16">&nbsp;</td>
- <td class="linenum">4</td>
- <td class="normal">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;y z</td>
- </tr>
- <tr>
- <td class="linenum">5</td>
- <td class="normal"></td>
- <td width="16">&nbsp;</td>
- <td class="linenum">5</td>
- <td class="normal"></td>
- </tr>
- <tr>
- <td class="linenum">6</td>
- <td class="normal">(* yminsky *)</td>
- <td width="16">&nbsp;</td>
- <td class="linenum">6</td>
- <td class="normal">(* yminsky *)</td>
- </tr>
- <tr>
- <td class="linenum">7</td>
- <td class="normal">let should_check_can_sell_and_marking regulatory_regime =</td>
- <td width="16">&nbsp;</td>
- <td class="linenum">7</td>
- <td class="normal">let should_check_can_sell_and_marking regulatory_regime =</td>
- </tr>
- <tr>
- <td class="linenum">8</td>
- <td class="normal">&nbsp;&nbsp;match z with</td>
- <td width="16">&nbsp;</td>
- <td class="linenum">8</td>
- <td class="normal">&nbsp;&nbsp;match z with</td>
- </tr>
- <tr>
- <td class="linenum">9</td>
- <td class="normal">&nbsp;&nbsp;| `foo</td>
- <td width="16">&nbsp;</td>
- <td class="linenum">9</td>
- <td class="normal">&nbsp;&nbsp;| `foo</td>
- </tr>
- <tr>
- <td class="linenum">10</td>
- <td class="normal">&nbsp;&nbsp;&nbsp;&nbsp;-&gt; some_function</td>
- <td width="16">&nbsp;</td>
- <td class="linenum">10</td>
- <td class="normal">&nbsp;&nbsp;&nbsp;&nbsp;-&gt; some_function</td>
- </tr>
- <tr>
- <td class="linenum">11</td>
- <td class="normal">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; argument</td>
- <td width="16">&nbsp;</td>
- <td class="linenum">11</td>
- <td class="normal">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; argument</td>
- </tr>
- <tr>
- <td class="linenum">12</td>
- <td class="normal"></td>
- <td width="16">&nbsp;</td>
- <td class="linenum">12</td>
- <td class="normal"></td>
- </tr>
- <tr>
- <td class="linenum">13</td>
- <td class="normal">(* CR pszilagyi: What would you say about this one: *)</td>
- <td width="16">&nbsp;</td>
- <td class="linenum">13</td>
- <td class="normal">(* CR pszilagyi: What would you say about this one: *)</td>
- </tr>
- <tr>
- <td class="linenum">14</td>
- <td class="normal">let f = fun x -&gt; ghi</td>
- <td width="16">&nbsp;</td>
- <td class="linenum">14</td>
- <td class="normal">let f = fun x -&gt; ghi</td>
- </tr>
- <tr>
- <td class="linenum">15</td>
- <td class="normal">&nbsp;&nbsp;&nbsp;&nbsp;x</td>
- <td width="16">&nbsp;</td>
- <td class="linenum">15</td>
- <td class="normal">&nbsp;&nbsp;&nbsp;&nbsp;x</td>
- </tr>
- <tr>
- <td class="linenum">16</td>
- <td class="normal"></td>
- <td width="16">&nbsp;</td>
- <td class="linenum">16</td>
- <td class="normal"></td>
- </tr>
- <tr>
- <td class="linenum">17</td>
- <td class="normal">let x =</td>
- <td width="16">&nbsp;</td>
- <td class="linenum">17</td>
- <td class="normal">let x =</td>
- </tr>
- <tr>
- <td class="linenum">18</td>
- <td class="normal">&nbsp;&nbsp;try x with a -&gt; b</td>
- <td width="16">&nbsp;</td>
- <td class="linenum">18</td>
- <td class="normal">&nbsp;&nbsp;try x with a -&gt; b</td>
- </tr>
- <tr>
- <td class="linenum">19</td>
- <td class="normal">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; | c -&gt; d</td>
- <td width="16">&nbsp;</td>
- <td class="linenum">19</td>
- <td class="normal">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; | c -&gt; d</td>
- </tr>
- <tr>
- <td class="linenum">20</td>
- <td class="normal"></td>
- <td width="16">&nbsp;</td>
- <td class="linenum">20</td>
- <td class="normal"></td>
- </tr>
- <tr>
- <td class="linenum">21</td>
- <td class="normal">let z =</td>
- <td width="16">&nbsp;</td>
- <td class="linenum">21</td>
- <td class="normal">let z =</td>
- </tr>
- <tr>
- <td class="linenum">22</td>
- <td class="normal">&nbsp;&nbsp;some_function</td>
- <td width="16">&nbsp;</td>
- <td class="linenum">22</td>
- <td class="normal">&nbsp;&nbsp;some_function</td>
- </tr>
- <tr>
- <td class="linenum">23</td>
- <td class="normal">&nbsp;&nbsp;&nbsp;&nbsp;argument</td>
- <td width="16">&nbsp;</td>
- <td class="linenum">23</td>
- <td class="normal">&nbsp;&nbsp;&nbsp;&nbsp;argument</td>
- </tr>
- <tr>
- <td class="linenum">24</td>
- <td class="normal"></td>
- <td width="16">&nbsp;</td>
- <td class="linenum">24</td>
- <td class="normal"></td>
- </tr>
- <tr>
- <td class="linenum">25</td>
- <td class="normal"></td>
- <td width="16">&nbsp;</td>
- <td class="linenum">25</td>
- <td class="normal"></td>
- </tr>
- <tr>
- <td class="linenum">26</td>
- <td class="normal"></td>
- <td width="16">&nbsp;</td>
- <td class="linenum">26</td>
- <td class="normal"></td>
- </tr>
- <tr>
- <td class="linenum">27</td>
- <td class="normal">(* dwu *)</td>
- <td width="16">&nbsp;</td>
- <td class="linenum">27</td>
- <td class="normal">(* dwu *)</td>
- </tr>
- <tr>
- <td class="linenum">28</td>
- <td class="normal">let () =</td>
- <td width="16">&nbsp;</td>
- <td class="linenum">28</td>
- <td class="normal">let () =</td>
- </tr>
- <tr>
- <td class="linenum">29</td>
- <td class="normal">&nbsp;&nbsp;f a b ~c:c</td>
- <td width="16">&nbsp;</td>
- <td class="linenum">29</td>
- <td class="normal">&nbsp;&nbsp;f a b ~c:c</td>
- </tr>
- <tr>
- <td class="linenum">30</td>
- <td class="normal">&nbsp;&nbsp;&nbsp;&nbsp;d</td>
- <td width="16">&nbsp;</td>
- <td class="linenum">30</td>
- <td class="normal">&nbsp;&nbsp;&nbsp;&nbsp;d</td>
- </tr>
- <tr>
- <td class="linenum">31</td>
- <td class="normal"></td>
- <td width="16">&nbsp;</td>
- <td class="linenum">31</td>
- <td class="normal"></td>
- </tr>
- <tr>
- <td class="linenum">32</td>
- <td class="normal">let () =</td>
- <td width="16">&nbsp;</td>
- <td class="linenum">32</td>
- <td class="normal">let () =</td>
- </tr>
- <tr>
- <td class="linenum">33</td>
- <td class="normal">&nbsp;&nbsp;f a b ~c:1.</td>
- <td width="16">&nbsp;</td>
- <td class="linenum">33</td>
- <td class="normal">&nbsp;&nbsp;f a b ~c:1.</td>
- </tr>
- <tr>
- <td class="linenum">34</td>
- <td class="normal">&nbsp;&nbsp;&nbsp;&nbsp;d</td>
- <td width="16">&nbsp;</td>
- <td class="linenum">34</td>
- <td class="normal">&nbsp;&nbsp;&nbsp;&nbsp;d</td>
- </tr>
- <tr>
- <td class="linenum">35</td>
- <td class="normal"></td>
- <td width="16">&nbsp;</td>
- <td class="linenum">35</td>
- <td class="normal"></td>
- </tr>
- <tr>
- <td class="linenum">36</td>
- <td class="normal">let () =</td>
- <td width="16">&nbsp;</td>
- <td class="linenum">36</td>
- <td class="normal">let () =</td>
- </tr>
- <tr>
- <td class="linenum">37</td>
- <td class="normal">&nbsp;&nbsp;My_module.f a b ~c:c</td>
- <td width="16">&nbsp;</td>
- <td class="linenum">37</td>
- <td class="normal">&nbsp;&nbsp;My_module.f a b ~c:c</td>
- </tr>
- <tr>
- <td class="linenum">38</td>
- <td class="normal">&nbsp;&nbsp;&nbsp;&nbsp;d</td>
- <td width="16">&nbsp;</td>
- <td class="linenum">38</td>
- <td class="normal">&nbsp;&nbsp;&nbsp;&nbsp;d</td>
- </tr>
- <tr>
- <td class="linenum">39</td>
- <td class="normal"></td>
- <td width="16">&nbsp;</td>
- <td class="linenum">39</td>
- <td class="normal"></td>
- </tr>
- <tr>
- <td class="linenum">40</td>
- <td class="normal">(* This last case is where Tuareg is inconsistent with the others. *)</td>
- <td width="16">&nbsp;</td>
- <td class="linenum">40</td>
- <td class="normal">(* This last case is where Tuareg is inconsistent with the others. *)</td>
- </tr>
- <tr>
- <td class="linenum">41</td>
- <td class="normal">let () =</td>
- <td width="16">&nbsp;</td>
- <td class="linenum">41</td>
- <td class="normal">let () =</td>
- </tr>
- <tr>
- <td class="linenum">42</td>
- <td class="normal">&nbsp;&nbsp;My_module.f a b ~c:1.</td>
- <td width="16">&nbsp;</td>
- <td class="linenum">42</td>
- <td class="normal">&nbsp;&nbsp;My_module.f a b ~c:1.</td>
- </tr>
- <tr>
- <td class="linenum">43</td>
- <td class="normal">&nbsp;&nbsp;&nbsp;&nbsp;d</td>
- <td width="16">&nbsp;</td>
- <td class="linenum">43</td>
- <td class="normal">&nbsp;&nbsp;&nbsp;&nbsp;d</td>
- </tr>
- <tr>
- <td class="linenum">44</td>
- <td class="normal"></td>
- <td width="16">&nbsp;</td>
- <td class="linenum">44</td>
- <td class="normal"></td>
- </tr>
- <tr>
- <td class="linenum">45</td>
- <td class="normal"></td>
- <td width="16">&nbsp;</td>
- <td class="linenum">45</td>
- <td class="normal"></td>
- </tr>
- <tr>
- <td class="linenum">46</td>
- <td class="normal"></td>
- <td width="16">&nbsp;</td>
- <td class="linenum">46</td>
- <td class="normal"></td>
- </tr>
- <tr>
- <td class="linenum">47</td>
- <td class="normal">let () =</td>
- <td width="16">&nbsp;</td>
- <td class="linenum">47</td>
- <td class="normal">let () =</td>
- </tr>
- <tr>
- <td class="linenum">48</td>
- <td class="normal">&nbsp;&nbsp;messages :=</td>
- <td width="16">&nbsp;</td>
- <td class="linenum">48</td>
- <td class="normal">&nbsp;&nbsp;messages :=</td>
- </tr>
- <tr>
- <td class="linenum">49</td>
- <td class="normal">&nbsp;&nbsp;&nbsp;&nbsp;Message_store.create (Session_id.of_string "")</td>
- <td width="16">&nbsp;</td>
- <td class="linenum">49</td>
- <td class="normal">&nbsp;&nbsp;&nbsp;&nbsp;Message_store.create (Session_id.of_string "")</td>
- </tr>
- <tr>
- <td class="linenum">50</td>
- <td class="normal">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;(* Tuareg indents these lines too far to the left. *)</td>
- <td width="16">&nbsp;</td>
- <td class="linenum">50</td>
- <td class="normal">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;(* Tuareg indents these lines too far to the left. *)</td>
- </tr>
- <tr>
- <td class="linenum">51</td>
- <td class="normal">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;"herd-retransmitter"</td>
- <td width="16">&nbsp;</td>
- <td class="linenum">51</td>
- <td class="normal">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;"herd-retransmitter"</td>
- </tr>
- <tr>
- <td class="linenum">52</td>
- <td class="normal">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Message_store.Message_size.Byte</td>
- <td width="16">&nbsp;</td>
- <td class="linenum">52</td>
- <td class="normal">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Message_store.Message_size.Byte</td>
- </tr>
- <tr>
- <td class="linenum">53</td>
- <td class="normal"></td>
- <td width="16">&nbsp;</td>
- <td class="linenum">53</td>
- <td class="normal"></td>
- </tr>
- <tr>
- <td class="linenum">54</td>
- <td class="normal"></td>
- <td width="16">&nbsp;</td>
- <td class="linenum">54</td>
- <td class="normal"></td>
- </tr>
- <tr>
- <td class="linenum">55</td>
- <td class="normal"></td>
- <td width="16">&nbsp;</td>
- <td class="linenum">55</td>
- <td class="normal"></td>
- </tr>
- <tr>
- <td class="linenum">56</td>
- <td class="normal">let () =</td>
- <td width="16">&nbsp;</td>
- <td class="linenum">56</td>
- <td class="normal">let () =</td>
- </tr>
- <tr>
- <td class="linenum">57</td>
- <td class="normal">&nbsp;&nbsp;raise (Bug ("foo"</td>
- <td width="16">&nbsp;</td>
- <td class="linenum">57</td>
- <td class="normal">&nbsp;&nbsp;raise (Bug ("foo"</td>
- </tr>
- <tr>
- <td class="linenum"><a name="failing/js-args.ml_58">58</a></td>
- <td class="modified">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;(* In this and similar cases, we want the subsequent lines to</td>
- <td width="16">&nbsp;</td>
- <td class="linenum">58</td>
- <td class="modified">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;(* In this and similar cases, we want the subsequent lines to</td>
- </tr>
- <tr>
- <td class="linenum"><a name="failing/js-args.ml_59">59</a></td>
- <td class="modified">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; align with the first expression. *)</td>
- <td width="16">&nbsp;</td>
- <td class="linenum">59</td>
- <td class="modified">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; align with the first expression. *)</td>
- </tr>
- <tr>
- <td class="linenum"><a name="failing/js-args.ml_60">60</a></td>
- <td class="modified">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;^ "bar"))</td>
- <td width="16">&nbsp;</td>
- <td class="linenum">60</td>
- <td class="modified">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;^ "bar"))</td>
- </tr>
- <tr>
- <td class="linenum">61</td>
- <td class="normal"></td>
- <td width="16">&nbsp;</td>
- <td class="linenum">61</td>
- <td class="normal"></td>
- </tr>
- <tr>
- <td class="linenum">62</td>
- <td class="normal">(* Except in specific cases, we want the argument indented relative to the</td>
- <td width="16">&nbsp;</td>
- <td class="linenum">62</td>
- <td class="normal">(* Except in specific cases, we want the argument indented relative to the</td>
- </tr>
- <tr>
- <td class="linenum">63</td>
- <td class="normal">&nbsp;&nbsp; function being called.&nbsp;&nbsp;(Exceptions include "fun" arguments where the line</td>
- <td width="16">&nbsp;</td>
- <td class="linenum">63</td>
- <td class="normal">&nbsp;&nbsp; function being called.&nbsp;&nbsp;(Exceptions include "fun" arguments where the line</td>
- </tr>
- <tr>
- <td class="linenum">64</td>
- <td class="normal">&nbsp;&nbsp; ends with "-&gt;" and subsequent lines beginning with operators, like above.) *)</td>
- <td width="16">&nbsp;</td>
- <td class="linenum">64</td>
- <td class="normal">&nbsp;&nbsp; ends with "-&gt;" and subsequent lines beginning with operators, like above.) *)</td>
- </tr>
- <tr>
- <td class="linenum">65</td>
- <td class="normal">let () =</td>
- <td width="16">&nbsp;</td>
- <td class="linenum">65</td>
- <td class="normal">let () =</td>
- </tr>
- <tr>
- <td class="linenum">66</td>
- <td class="normal">&nbsp;&nbsp;Some (Message_store.create s</td>
- <td width="16">&nbsp;</td>
- <td class="linenum">66</td>
- <td class="normal">&nbsp;&nbsp;Some (Message_store.create s</td>
- </tr>
- <tr>
- <td class="linenum"><a name="failing/js-args.ml_67">67</a></td>
- <td class="modified">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;"herd-retransmitter" ~unlink:true Message_store.Message_size.Byte)</td>
- <td width="16">&nbsp;</td>
- <td class="linenum">67</td>
- <td class="modified">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;"herd-retransmitter" ~unlink:true Message_store.Message_size.Byte)</td>
- </tr>
-</table>
-<hr/>
-<i>Generated by <b>diff2html</b> on 2013-03-08 13:21:14</i>
+<p>All tests pass: no currently known bugs.</p>
</body>
</html>
View
6 tests/passing/edge-cases.ml
@@ -30,11 +30,11 @@ let f = (fun x ->
)
let f g = g @@ fun x ->
- x
+ x
let f g = g @@ (fun x ->
- x
- )
+ x
+ )
(* the above should probably be consistent with: *)
View
6 tests/passing/js-functor.ml
@@ -17,6 +17,6 @@ module M =
(* CR pszilagyi: That is pretty awful. We really want this? Let's at least discourage
the F style for multi-argument functors? *)
include F(struct
- let blah _
- end)
- (G)
+ let blah _
+ end)
+ (G)
View
2 tests/passing/js-let.ml
@@ -16,5 +16,5 @@ let foo arguments
= bar
let foo
- arguments
+ arguments
= bar
View
8 tests/passing/js-pipebang.ml
@@ -41,8 +41,8 @@ let _ =
let _ =
List.filter_opt [
format old (fun old -> "removed: "
- ^ (List.map old ~f:(fun (k, v) -> k ^ "=" ^ acl_to_string v)
- |! String.concat ~sep:", "))
+ ^ (List.map old ~f:(fun (k, v) -> k ^ "=" ^ acl_to_string v)
+ |! String.concat ~sep:", "))
]
@@ -78,6 +78,6 @@ let _ =
let _ =
List.filter_opt [
format old (fun old -> "removed: "
- ^ (List.map old ~f:(fun (k, v) -> k ^ "=" ^ acl_to_string v)
- |> String.concat ~sep:", "))
+ ^ (List.map old ~f:(fun (k, v) -> k ^ "=" ^ acl_to_string v)
+ |> String.concat ~sep:", "))
]
View
2 tests/passing/unit-lex.ml
@@ -87,7 +87,7 @@ _ = _
> _
@ _
^$ _
- %%
+ %%
;;
!! ( ????: _ )

0 comments on commit 9d25f05

Please sign in to comment.
Something went wrong with that request. Please try again.