Skip to content

Commit d60a8ff

Browse files
kim-emnomeata
authored andcommitted
Un-exit source (stage0 audit)
instead of c1c13d2
1 parent c3d78e7 commit d60a8ff

File tree

33 files changed

+31278
-7476
lines changed

33 files changed

+31278
-7476
lines changed

src/Lean/Elab/Tactic/HaveI.lean

Lines changed: 0 additions & 44 deletions
Original file line numberDiff line numberDiff line change
@@ -13,47 +13,3 @@ but instead inline the value instead.
1313
This is useful to declare local instances and proofs in theorem statements
1414
and subgoals, where the extra binding is inconvenient.
1515
-/
16-
17-
#exit
18-
19-
namespace Std.Tactic
20-
21-
22-
macro_rules
23-
| `(haveI $hy:hygieneInfo $bs* $[: $ty]? := $val; $body) =>
24-
`(haveI $(HygieneInfo.mkIdent hy `this (canonical := true)) $bs* $[: $ty]? := $val; $body)
25-
| `(haveI _ $bs* := $val; $body) => `(haveI x $bs* : _ := $val; $body)
26-
| `(haveI _ $bs* : $ty := $val; $body) => `(haveI x $bs* : $ty := $val; $body)
27-
| `(haveI $x:ident $bs* := $val; $body) => `(haveI $x $bs* : _ := $val; $body)
28-
| `(haveI $_:ident $_* : $_ := $_; $_) => throwUnsupported -- handled by elab
29-
30-
macro_rules
31-
| `(letI $hy:hygieneInfo $bs* $[: $ty]? := $val; $body) =>
32-
`(letI $(HygieneInfo.mkIdent hy `this (canonical := true)) $bs* $[: $ty]? := $val; $body)
33-
| `(letI _ $bs* := $val; $body) => `(letI x $bs* : _ := $val; $body)
34-
| `(letI _ $bs* : $ty := $val; $body) => `(letI x $bs* : $ty := $val; $body)
35-
| `(letI $x:ident $bs* := $val; $body) => `(letI $x $bs* : _ := $val; $body)
36-
| `(letI $_:ident $_* : $_ := $_; $_) => throwUnsupported -- handled by elab
37-
38-
elab_rules <= expectedType
39-
| `(haveI $x:ident $bs* : $ty := $val; $body) => do
40-
let (ty, val) ← elabBinders bs fun bs => do
41-
let ty ← elabType ty
42-
let val ← elabTermEnsuringType val ty
43-
pure (← mkForallFVars bs ty, ← mkLambdaFVars bs val)
44-
withLocalDeclD x.getId ty fun x => do
45-
return (← (← elabTerm body expectedType).abstractM #[x]).instantiate #[val]
46-
47-
elab_rules <= expectedType
48-
| `(letI $x:ident $bs* : $ty := $val; $body) => do
49-
let (ty, val) ← elabBinders bs fun bs => do
50-
let ty ← elabType ty
51-
let val ← elabTermEnsuringType val ty
52-
pure (← mkForallFVars bs ty, ← mkLambdaFVars bs val)
53-
withLetDecl x.getId ty val fun x => do
54-
return (← (← elabTerm body expectedType).abstractM #[x]).instantiate #[val]
55-
56-
/-- `haveI` behaves like `have`, but inlines the value instead of producing a `let_fun` term. -/
57-
macro "haveI" d:haveDecl : tactic => `(tactic| refine_lift haveI $d:haveDecl; ?_)
58-
/-- `letI` behaves like `let`, but inlines the value instead of producing a `let_fun` term. -/
59-
macro "letI" d:haveDecl : tactic => `(tactic| refine_lift letI $d:haveDecl; ?_)

stage0/src/library/compiler/llvm.cpp

Lines changed: 72 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

stage0/stdlib/Init.c

Lines changed: 9 additions & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)