-
Notifications
You must be signed in to change notification settings - Fork 80
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(library/noncomputable): add
vm_decl.noncomputable_reason
(#638)
This exposes whether and why a definition is noncomputable.
- Loading branch information
1 parent
ea08a3f
commit 1340477
Showing
4 changed files
with
27 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
constant foo : ℕ | ||
|
||
noncomputable def bar : ℕ := foo | ||
|
||
def baz : ℕ := 0 | ||
|
||
open tactic | ||
run_cmd do | ||
e ← get_env, | ||
trace $ e.decl_noncomputable_reason `foo, | ||
trace $ e.decl_noncomputable_reason `bar, | ||
trace $ e.decl_noncomputable_reason `baz |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
none | ||
(some foo) | ||
none |