Skip to content

Commit 00ad634

Browse files
format
1 parent 7c44b4f commit 00ad634

File tree

2 files changed

+19
-19
lines changed

2 files changed

+19
-19
lines changed

testsuite/tests/parsetree/source_jane_street.ml

+13-14
Original file line numberDiff line numberDiff line change
@@ -445,20 +445,19 @@ let f ~(x1 @ many)
445445

446446
[%%expect{|
447447
val f :
448-
('b : value_or_null) ('c : value_or_null) ('d : value_or_null) 'e.
449-
x1:'b ->
450-
x2:local_ string -> local_
451-
(x3:local_ (string -> string) ->
452-
x4:local_ ('a. 'a -> 'a) ->
453-
x5:local_ 'c ->
454-
x6:local_ bool ->
455-
x7:local_ bool ->
456-
x8:local_ unit ->
457-
string ->
458-
local_ 'd -> local_
459-
'b * string * (string -> string) * ('e -> 'e) * 'c * string * string *
460-
int array * string * (int -> local_ (int -> int) @ unyielding) *
461-
(int -> local_ (int -> int) @ unyielding) @ contended) @ unyielding =
448+
x1:'b ->
449+
x2:local_ string -> local_
450+
(x3:local_ (string -> string) ->
451+
x4:local_ ('a. 'a -> 'a) ->
452+
x5:local_ 'c ->
453+
x6:local_ bool ->
454+
x7:local_ bool ->
455+
x8:local_ unit ->
456+
string ->
457+
local_ 'd -> local_
458+
'b * string * (string -> string) * ('e -> 'e) * 'c * string * string *
459+
int array * string * (int -> local_ (int -> int) @ unyielding) *
460+
(int -> local_ (int -> int) @ unyielding) @ contended) @ unyielding =
462461
<fun>
463462
|}, Principal{|
464463
val f :

typing/typemode.ml

+6-5
Original file line numberDiff line numberDiff line change
@@ -100,14 +100,15 @@ let transl_modifier_annots annots =
100100
let modifiers = List.fold_left step empty_modifiers annots in
101101
(* Since [yielding] is the default mode in presence of [local],
102102
the [global] modifier must also apply [unyielding] unless specified. *)
103-
match Opt_axis_collection.get ~axis:(Modal Yielding) modifiers,
104-
Opt_axis_collection.get ~axis:(Modal Locality) modifiers with
103+
match
104+
( Opt_axis_collection.get ~axis:(Modal Yielding) modifiers,
105+
Opt_axis_collection.get ~axis:(Modal Locality) modifiers )
106+
with
105107
| None, Some Global ->
106-
Opt_axis_collection.set ~axis:(Modal Yielding)
107-
modifiers (Some Yielding.Const.Unyielding)
108+
Opt_axis_collection.set ~axis:(Modal Yielding) modifiers
109+
(Some Yielding.Const.Unyielding)
108110
| _, _ -> modifiers
109111

110-
111112
let default_mode_annots (annots : Alloc.Const.Option.t) =
112113
(* Unlike all other modes, [yielding] has a different default
113114
depending on whether [areality] is [Global] or [Local]. *)

0 commit comments

Comments
 (0)