diff --git a/.github/workflows/build-template.yml b/.github/workflows/build-template.yml index 7b801ef2ff..3f4379489a 100644 --- a/.github/workflows/build-template.yml +++ b/.github/workflows/build-template.yml @@ -215,7 +215,7 @@ jobs: path: pack/* - name: Lean stats run: | - build/stage1/bin/lean --stats src/Lean.lean -Dexperimental.module=true + build/$TARGET_STAGE/bin/lean --stats src/Lean.lean -Dexperimental.module=true if: ${{ !matrix.cross }} - name: Test id: test diff --git a/src/Lean/Meta/DiscrTree.lean b/src/Lean/Meta/DiscrTree.lean index fc3a0bc4fc..b7777f2c38 100644 --- a/src/Lean/Meta/DiscrTree.lean +++ b/src/Lean/Meta/DiscrTree.lean @@ -53,24 +53,12 @@ namespace Lean.Meta.DiscrTree 2- Distinguish partial applications `f a`, `f a b`, and `f a b c`. -/ -/-- -An ordering for the key that puts `star` and `other` first. Differs from the auto-generated `ctorIdx`. --/ -private def Key.ctorIdx' : Key → Nat - | .star => 0 - | .other => 1 - | .lit .. => 2 - | .fvar .. => 3 - | .const .. => 4 - | .arrow => 5 - | .proj .. => 6 - def Key.lt : Key → Key → Bool | .lit v₁, .lit v₂ => v₁ < v₂ | .fvar n₁ a₁, .fvar n₂ a₂ => Name.quickLt n₁.name n₂.name || (n₁ == n₂ && a₁ < a₂) | .const n₁ a₁, .const n₂ a₂ => Name.quickLt n₁ n₂ || (n₁ == n₂ && a₁ < a₂) | .proj s₁ i₁ a₁, .proj s₂ i₂ a₂ => Name.quickLt s₁ s₂ || (s₁ == s₂ && i₁ < i₂) || (s₁ == s₂ && i₁ == i₂ && a₁ < a₂) - | k₁, k₂ => k₁.ctorIdx' < k₂.ctorIdx' + | k₁, k₂ => k₁.ctorIdx < k₂.ctorIdx instance : LT Key := ⟨fun a b => Key.lt a b⟩ instance (a b : Key) : Decidable (a < b) := inferInstanceAs (Decidable (Key.lt a b)) diff --git a/src/Lean/Meta/DiscrTreeTypes.lean b/src/Lean/Meta/DiscrTreeTypes.lean index d50d70971d..a885fdf107 100644 --- a/src/Lean/Meta/DiscrTreeTypes.lean +++ b/src/Lean/Meta/DiscrTreeTypes.lean @@ -20,11 +20,11 @@ namespace DiscrTree Discrimination tree key. See `DiscrTree` -/ inductive Key where - | const : Name → Nat → Key - | fvar : FVarId → Nat → Key - | lit : Literal → Key | star : Key | other : Key + | lit : Literal → Key + | fvar : FVarId → Nat → Key + | const : Name → Nat → Key | arrow : Key | proj : Name → Nat → Nat → Key deriving Inhabited, BEq, Repr diff --git a/stage0/src/stdlib_flags.h b/stage0/src/stdlib_flags.h index 79a0e58edd..893fc7e00c 100644 --- a/stage0/src/stdlib_flags.h +++ b/stage0/src/stdlib_flags.h @@ -1,5 +1,7 @@ #include "util/options.h" +// please update stage0 + namespace lean { options get_default_options() { options opts; @@ -11,7 +13,7 @@ options get_default_options() { opts = opts.update({"debug", "terminalTacticsAsSorry"}, false); // switch to `true` for ABI-breaking changes affecting meta code; // see also next option! - opts = opts.update({"interpreter", "prefer_native"}, false); + opts = opts.update({"interpreter", "prefer_native"}, true); // switch to `false` when enabling `prefer_native` should also affect use // of built-in parsers in quotations; this is usually the case, but setting // both to `true` may be necessary for handling non-builtin parsers with