Skip to content

Commit 50746d7

Browse files
bacamnbdd0121
authored andcommitted
Rename the effect type effects for OCaml 5.3 keyword compatibility
1 parent 0a978e0 commit 50746d7

File tree

4 files changed

+13
-13
lines changed

4 files changed

+13
-13
lines changed

src/lib/ast_util.ml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -730,7 +730,7 @@ let mk_typquant qis = TypQ_aux (TypQ_tq qis, Parse_ast.Unknown)
730730

731731
let mk_fexp id exp = FE_aux (FE_fexp (id, exp), no_annot)
732732

733-
type effect = bool
733+
type effects = bool
734734

735735
let no_effect = false
736736
let monadic_effect = true

src/lib/ast_util.mli

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -295,16 +295,16 @@ val constraint_conj : n_constraint -> n_constraint list
295295
(** Same as constraint_conj but for disjunctions *)
296296
val constraint_disj : n_constraint -> n_constraint list
297297

298-
type effect
298+
type effects
299299

300-
val no_effect : effect
301-
val monadic_effect : effect
300+
val no_effect : effects
301+
val monadic_effect : effects
302302

303-
val effectful : effect -> bool
303+
val effectful : effects -> bool
304304

305-
val equal_effects : effect -> effect -> bool
306-
val subseteq_effects : effect -> effect -> bool
307-
val union_effects : effect -> effect -> effect
305+
val equal_effects : effects -> effects -> bool
306+
val subseteq_effects : effects -> effects -> bool
307+
val union_effects : effects -> effects -> effects
308308

309309
(** {2 Functions for building numeric expressions} *)
310310

src/lib/type_check.ml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1290,7 +1290,7 @@ let can_be_undefined ~at:l env typ =
12901290
type tannot' = {
12911291
env : Env.t;
12921292
typ : typ;
1293-
monadic : effect;
1293+
monadic : effects;
12941294
expected : typ option;
12951295
instantiation : typ_arg KBindings.t option;
12961296
}

src/lib/type_check.mli

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -416,10 +416,10 @@ val env_of_mpat : tannot mpat -> Env.t
416416
val typ_of_mpexp : tannot mpexp -> typ
417417
val env_of_mpexp : tannot mpexp -> Env.t
418418

419-
val effect_of : tannot exp -> effect
420-
val effect_of_pat : tannot pat -> effect
421-
val effect_of_annot : tannot -> effect
422-
val add_effect_annot : tannot -> effect -> tannot
419+
val effect_of : tannot exp -> effects
420+
val effect_of_pat : tannot pat -> effects
421+
val effect_of_annot : tannot -> effects
422+
val add_effect_annot : tannot -> effects -> tannot
423423

424424
(* Returns the type that an expression was checked against, if any.
425425
Note that these may be removed if an expression is rewritten. *)

0 commit comments

Comments
 (0)