when the transparency mode is `.all`, then one expects `getFunInfo` and `inferType` to also work with that transparency mode. Fixes #5562 Fixes #2975 Fixes #2194
19 lines
396 B
Text
19 lines
396 B
Text
import Lean
|
|
open Lean Meta Elab Term
|
|
|
|
elab "#reduce'" t:term : command => Elab.Command.runTermElabM fun _ => do
|
|
let e ← withSynthesize <| elabTerm t none
|
|
let e ← Meta.reduce e
|
|
withTransparency TransparencyMode.all do
|
|
logInfo m!"{← inferType e}"
|
|
|
|
structure S where
|
|
x : Nat
|
|
|
|
def S' := S
|
|
def S'.x (s : S') : Nat := S.x s
|
|
|
|
attribute [irreducible] S'
|
|
|
|
variable (s : S')
|
|
#reduce' s.x
|