Skip to content

Commit

Permalink
CRs for annotations that can go away
Browse files Browse the repository at this point in the history
  • Loading branch information
glittershark committed Jan 28, 2025
1 parent bebc164 commit f1d9e0f
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 4 deletions.
4 changes: 3 additions & 1 deletion otherlibs/stdlib_alpha/capsule.ml
Original file line number Diff line number Diff line change
Expand Up @@ -362,7 +362,9 @@ module Rwlock = struct
[@@unsafe_allow_any_mode_crossing]

type packed : value mod portable uncontended = P : 'k t -> packed
[@@unsafe_allow_any_mode_crossing]
[@@unsafe_allow_any_mode_crossing
"CR layouts v2.8: This can go away once we have proper mode crossing \
inference for GADT constructors "]

exception Poisoned

Expand Down
8 changes: 6 additions & 2 deletions otherlibs/stdlib_alpha/capsule.mli
Original file line number Diff line number Diff line change
Expand Up @@ -180,7 +180,9 @@ module Mutex : sig
the capsule ['k] using {!create_with_mutex}. *)

type packed : value mod portable uncontended = P : 'k t -> packed
[@@unsafe_allow_any_mode_crossing]
[@@unsafe_allow_any_mode_crossing
"CR layouts v2.8: This can go away once we have proper mode crossing \
inference for GADT constructors "]
(** [packed] is the type of a mutex for some unknown capsule.
Unpacking one provides a ['k Mutex.t] together with a fresh
existential type brand for ['k]. *)
Expand Down Expand Up @@ -220,7 +222,9 @@ module Rwlock : sig
the capsule ['k] using {!create_with_rwlock} *)

type packed : value mod portable uncontended = P : 'k t -> packed
[@@unsafe_allow_any_mode_crossing]
[@@unsafe_allow_any_mode_crossing
"CR layouts v2.8: This can go away once we have proper mode crossing \
inference for GADT constructors "]
(** [packed] is the type of a reader-writer lock for some unknown capsule.
Unpacking one provides a ['k Rwlock.t] together with a fresh existential type
brand for ['k]. *)
Expand Down
3 changes: 2 additions & 1 deletion testsuite/tests/capsule-api/rwlock_capsule.ml
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,8 @@ type _packed : value mod portable uncontended = Capsule.Rwlock.packed
This only holds when 'a also crosses portability *)

type 'a myref : value mod portable = { mutable v : 'a}
[@@unsafe_allow_any_mode_crossing]
[@@unsafe_allow_any_mode_crossing
"CR layouts v2.8: This can go away once we have with-kinds"]


module RwCell = struct
Expand Down

0 comments on commit f1d9e0f

Please sign in to comment.