Skip to content

Commit

Permalink
Delete old constructor test
Browse files Browse the repository at this point in the history
  • Loading branch information
Negabinary committed Feb 17, 2025
1 parent 9f988aa commit 06615ab
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 12 deletions.
14 changes: 12 additions & 2 deletions src/haz3lcore/statics/Elaborator.re
Original file line number Diff line number Diff line change
Expand Up @@ -242,7 +242,12 @@ let rec elaborate_pattern =
switch (Mode.ctr_ana_typ(ctx, mode, c), Ctx.lookup_ctr(ctx, c)) {
| (Some(ana_ty), _) => ana_ty
| (_, Some({typ: syn_ty, _})) => syn_ty
| _ => Unknown(Internal) |> Typ.temp
| _ =>
Sum([
ConstructorMap.Variant(c, [Id.invalid], None),
ConstructorMap.BadEntry(Unknown(Internal) |> Typ.temp),
])
|> Typ.temp
};
let t = t |> Typ.normalize(ctx);
Constructor(c, t) |> rewrap |> cast_from(t);
Expand Down Expand Up @@ -333,7 +338,12 @@ let rec elaborate = (m: Statics.Map.t, uexp: Exp.t): (DHExp.t, Typ.t) => {
switch (Mode.ctr_ana_typ(ctx, mode, c), Ctx.lookup_ctr(ctx, c)) {
| (Some(ana_ty), _) => ana_ty
| (_, Some({typ: syn_ty, _})) => syn_ty
| _ => Unknown(Internal) |> Typ.temp
| _ =>
Sum([
ConstructorMap.Variant(c, [Id.invalid], None),
ConstructorMap.BadEntry(Unknown(Internal) |> Typ.temp),
])
|> Typ.temp
};
let t = t |> Typ.normalize(ctx) |> Typ.all_ids_temp;
Constructor(c, t) |> rewrap |> cast_from(t);
Expand Down
10 changes: 0 additions & 10 deletions test/Test_Elaboration.re
Original file line number Diff line number Diff line change
Expand Up @@ -995,16 +995,6 @@ module MenhirElaborationTests = {
failed_cast_uexp,
);

let constructor_str = "X";
let constructor_uexp: Exp.t =
Constructor("X", Unknown(Internal) |> Typ.fresh) |> Exp.fresh;
let constructor_menhir = () =>
alco_check_menhir(
"Constructor test (menhir)",
constructor_str,
constructor_uexp,
);

/*
<<1 / 2 ? `a`>>
*/
Expand Down

0 comments on commit 06615ab

Please sign in to comment.