Skip to content

Commit bf120a4

Browse files
committed
make [all] ordered
1 parent edc4a6c commit bf120a4

File tree

3 files changed

+11
-8
lines changed

3 files changed

+11
-8
lines changed

testsuite/tests/typing-layouts/allow_any.ml

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -385,10 +385,10 @@ Lines 1-2, characters 0-34:
385385
Error: This variant or record definition does not match that of type "'a t"
386386
They have different unsafe mode crossing behavior:
387387
Both specify [@@unsafe_allow_any_mode_crossing], but their bounds are not equal
388-
the original has: mod many portable contended unyielding stateless
389-
immutable with 'a
390-
but this has: mod many portable contended unyielding stateless
391-
immutable
388+
the original has: mod unyielding many stateless portable immutable
389+
contended with 'a
390+
but this has: mod unyielding many stateless portable immutable
391+
contended
392392
|}]
393393

394394
type ('a, 'b) arity_2 : immutable_data with 'b = { x : 'a }
@@ -406,10 +406,10 @@ Error: This variant or record definition does not match that of type
406406
"('a, 'b) arity_2"
407407
They have different unsafe mode crossing behavior:
408408
Both specify [@@unsafe_allow_any_mode_crossing], but their bounds are not equal
409-
the original has: mod many portable contended unyielding stateless
410-
immutable with 'b
411-
but this has: mod many portable contended unyielding stateless
412-
immutable with 'a
409+
the original has: mod unyielding many stateless portable immutable
410+
contended with 'b
411+
but this has: mod unyielding many stateless portable immutable
412+
contended with 'a
413413
|}]
414414

415415
(* mcomp *)

typing/mode.ml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2379,6 +2379,7 @@ module Value_with (Areality : Areality) = struct
23792379
P (Comonadic Yielding);
23802380
P (Comonadic Statefulness);
23812381
P (Monadic Visibility) ]
2382+
|> List.sort (fun (P ax0) (P ax1) -> compare ax0 ax1)
23822383
end
23832384

23842385
let proj_obj : type a d0 d1. (a, d0, d1) Axis.t -> a C.obj = function

typing/mode_intf.mli

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -425,12 +425,14 @@ module type S = sig
425425
| Monadic : (Monadic.Const.t, 'a) Axis.t -> ('a, 'd, 'd neg) t
426426
| Comonadic : (Comonadic.Const.t, 'a) Axis.t -> ('a, 'd, 'd pos) t
427427

428+
(** Compare two axes in implication order. If A implies B, then A is before B. *)
428429
val compare : ('a, 'd0, 'd1) t -> ('b, 'e0, 'e1) t -> int
429430

430431
type packed = P : (_, _, _) t -> packed
431432

432433
val print : Format.formatter -> ('a, _, _) t -> unit
433434

435+
(** List of all axes, ordered by [compare]. *)
434436
val all : packed list
435437
end
436438

0 commit comments

Comments
 (0)