Skip to content

Commit

Permalink
Revert "add constraint_ty"
Browse files Browse the repository at this point in the history
This reverts commit a511ce9.
  • Loading branch information
pigumar1 committed May 4, 2024
1 parent fd86321 commit 17f55a4
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 41 deletions.
19 changes: 2 additions & 17 deletions src/haz3lcore/statics/Info.re
Original file line number Diff line number Diff line change
Expand Up @@ -561,27 +561,12 @@ let derived_exp =

/* Add derivable attributes for pattern terms */
let derived_pat =
(
~upat: UPat.t,
~ctx,
~co_ctx,
~mode,
~ancestors,
~self,
~constraint_,
~constraint_ty,
)
(~upat: UPat.t, ~ctx, ~co_ctx, ~mode, ~ancestors, ~self, ~constraint_)
: pat => {
let cls = Cls.Pat(UPat.cls_of_term(upat.term));
let status = status_pat(ctx, mode, self);
let ty = fixed_typ_pat(ctx, mode, self);
let constraint_mode =
switch (constraint_ty) {
| None => mode
| Some(ty) => Ana(ty)
};
let constraint_ =
fixed_constraint_pat(upat, ctx, constraint_mode, self, constraint_);
let constraint_ = fixed_constraint_pat(upat, ctx, mode, self, constraint_);
{
cls,
self,
Expand Down
24 changes: 0 additions & 24 deletions src/haz3lcore/statics/Statics.re
Original file line number Diff line number Diff line change
Expand Up @@ -419,28 +419,6 @@ and uexp_to_info_map =
let rules_to_info_map = (rules: list((UPat.t, UExp.t)), m) => {
let (ps, es) = List.split(rules);
let branch_ids = List.map(UExp.rep_id, es);
// let rec get_scrut_ty = ps => {
// switch (ps) {
// | [] => scrut.ty
// | [p, ...ps] =>
// let (p', _m) =
// go_pat(
// ~is_synswitch=false,
// ~co_ctx=CoCtx.empty,
// p,
// m,
// );
// switch (Info.pat_ty(p')) {
// | Unknown(_) => get_scrut_ty(ps)
// | ty => ty
// };
// };
// };
// let scrut_ty =
// switch (scrut.ty) {
// | Unknown(_) => get_scrut_ty(ps)
// | _ => scrut.ty
// };
let (ps', m) =
map_m(
go_pat(
Expand Down Expand Up @@ -567,7 +545,6 @@ and upat_to_info_map =
~co_ctx,
~ancestors: Info.ancestors,
~mode: Mode.t=Mode.Syn,
~constraint_ty: option(Typ.t)=None,
{ids, term} as upat: UPat.t,
m: Map.t,
)
Expand All @@ -582,7 +559,6 @@ and upat_to_info_map =
~ancestors,
~self=Common(self),
~constraint_,
~constraint_ty,
);
(info, add_info(ids, InfoPat(info), m));
};
Expand Down

0 comments on commit 17f55a4

Please sign in to comment.