File tree 3 files changed +16
-10
lines changed
3 files changed +16
-10
lines changed Original file line number Diff line number Diff line change @@ -1665,16 +1665,14 @@ let with_locality_and_yielding (locality, yielding) m =
1665
1665
let m' = Alloc. newvar () in
1666
1666
Locality. equate_exn (Alloc. proj (Comonadic Areality ) m') locality;
1667
1667
Yielding. equate_exn (Alloc. proj (Comonadic Yielding ) m') yielding;
1668
- Alloc. submode_exn m'
1669
- (Alloc. join_with
1670
- (Comonadic Yielding )
1671
- Yielding.Const. max
1672
- (Alloc. join_with (Comonadic Areality ) Locality.Const. max m));
1673
- Alloc. submode_exn
1674
- (Alloc. meet_with
1675
- (Comonadic Areality )
1676
- Locality.Const. min
1677
- (Alloc. meet_with (Comonadic Yielding ) Yielding.Const. min m)) m';
1668
+ Alloc. submode_exn m' (Alloc. join_const
1669
+ { Alloc.Const. min with
1670
+ areality = Locality.Const. max;
1671
+ yielding = Yielding.Const. max} m);
1672
+ Alloc. submode_exn (Alloc. meet_const
1673
+ { Alloc.Const. max with
1674
+ areality = Locality.Const. min;
1675
+ yielding = Yielding.Const. min} m) m';
1678
1676
m'
1679
1677
1680
1678
let curry_mode alloc arg : Alloc.Const.t =
Original file line number Diff line number Diff line change @@ -2188,6 +2188,12 @@ module Value_with (Areality : Areality) = struct
2188
2188
let monadic = Monadic. meet_const c.monadic monadic in
2189
2189
{ monadic; comonadic }
2190
2190
2191
+ let join_const c { comonadic; monadic } =
2192
+ let c = split c in
2193
+ let comonadic = Comonadic. join_const c.comonadic comonadic in
2194
+ let monadic = Monadic. join_const c.monadic monadic in
2195
+ { monadic; comonadic }
2196
+
2191
2197
let imply c { comonadic; monadic } =
2192
2198
let c = split c in
2193
2199
let comonadic = Comonadic. imply c.comonadic comonadic in
Original file line number Diff line number Diff line change @@ -432,6 +432,8 @@ module type S = sig
432
432
433
433
val meet_const : Const .t -> ('l * 'r ) t -> ('l * 'r ) t
434
434
435
+ val join_const : Const .t -> ('l * 'r ) t -> ('l * 'r ) t
436
+
435
437
val imply : Const .t -> ('l * 'r ) t -> (disallowed * 'r ) t
436
438
437
439
(* The following two are about the scenario where we partially apply a
You can’t perform that action at this time.
0 commit comments