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.
21 lines
280 B
Text
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
|