Skip to content

Commit 1d21daf

Browse files
authored
Merge pull request #560 from ocaml-multicore/restore-trunk-build
Rework GADT index types to get Lin compiling on trunk again
2 parents 32e9a31 + dfabf5a commit 1d21daf

3 files changed

Lines changed: 13 additions & 6 deletions

File tree

CHANGES.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,12 @@
11
# Changes
22

3+
## NEXT RELEASE
4+
5+
- #560: Change `Lin.{constructible,deconstructible}` from an empty variant type
6+
to an abstract type to get `Lin` compiling on `5.5.0+trunk` again, due
7+
to https://github.com/ocaml/ocaml/pull/13994 removing special handling
8+
of abstract and empty variants defined in the current module.
9+
310
## 0.8
411

512
- #540: Significantly increase the probability of context switching in `Lin_thread`

lib/lin.ml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -141,11 +141,11 @@ end
141141

142142
(* Type-representing values *)
143143

144-
type constructible = |
145-
type deconstructible = |
144+
type constructible = private Constructible [@@ocaml.warning "-37"]
145+
type deconstructible = private Deconstructible [@@ocaml.warning "-37"]
146146

147-
type combinable
148-
type noncombinable
147+
type combinable = private Combinable [@@ocaml.warning "-37"]
148+
type noncombinable = private Noncombinable [@@ocaml.warning "-37"]
149149

150150
type (_,_,_,_) ty =
151151
| Gen : 'a QCheck.arbitrary * ('a -> string) -> ('a, constructible, 's, combinable) ty

lib/lin.mli

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -57,10 +57,10 @@ end
5757

5858
(** {1 Type-representing values} *)
5959

60-
type constructible = |
60+
type constructible
6161
(** Type definition to denote whether a described type can be generated *)
6262

63-
type deconstructible = |
63+
type deconstructible
6464
(** Type definition to denote whether a described type can be deconstructed,
6565
i.e., tested for equality. *)
6666

0 commit comments

Comments
 (0)