lean4-htt/tests/lean/run/noncomputableUnused.lean
Cameron Zwarich 5aa706435a
fix: incorporate info from _redArg decls for noncomputable check (#10040)
This PR changes the `toMono` pass to replace decls with their `_redArg`
equivalent, which has the consequence of not considering arguments
deemed useless by the `reduceArity` pass for the purposes of the
`noncomputable` check.
2025-08-22 01:02:40 +00:00

21 lines
280 B
Text

@[noinline]
noncomputable def noncomp (a : Nat) : Nat := a
@[noinline]
def f (_ b : Nat) : Nat := b
def g (b : Nat) := f (noncomp 0) b
def h (b : Nat) := f (Classical.choice inferInstance) b
/--
info: 37
-/
#guard_msgs in
#eval g 37
/--
info: 42
-/
#guard_msgs in
#eval h 42