previously, `#eval` would happily evaluate expressions that contain `sorry`, either explicitly or because of failing tactics. In conjunction with operations like array access this can lead to the lean process crashing, which isn't particularly great. So how `#eval` will refuse to run code that (transitively) depends on the `sorry` axiom (using the same code as `#print axioms`). If the user really wants to run it, they can use `#eval!`. Closes #1697
13 lines
185 B
Text
13 lines
185 B
Text
structure S :=
|
|
(a : Nat) (h : a > 0) (b : Nat)
|
|
|
|
def f (s : S) :=
|
|
s.b - s.a
|
|
|
|
/--
|
|
warning: declaration uses 'sorry'
|
|
---
|
|
info: 25
|
|
-/
|
|
#guard_msgs in
|
|
#eval! f {a := 5, b := 30, h := sorry }
|