/
js-args.ml
67 lines (50 loc) · 1.28 KB
/
js-args.ml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
let () =
foo.bar <-
f x
y z
(* yminsky *)
let should_check_can_sell_and_marking regulatory_regime =
match z with
| `foo
-> some_function
argument
(* CR pszilagyi: What would you say about this one: *)
let f = fun x -> ghi
x
let x =
try x with a -> b
| c -> d
let z =
some_function
argument
(* dwu *)
let () =
f a b ~c:c
d
let () =
f a b ~c:1.
d
let () =
My_module.f a b ~c:c
d
(* This last case is where Tuareg is inconsistent with the others. *)
let () =
My_module.f a b ~c:1.
d
let () =
messages :=
Message_store.create (Session_id.of_string "")
(* Tuareg indents these lines too far to the left. *)
"herd-retransmitter"
Message_store.Message_size.Byte
let () =
raise (Bug ("foo"
(* 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)