-
Notifications
You must be signed in to change notification settings - Fork 143
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Indicate correct way to implement parsing in theory add-ons
Workaround for issue identified in github issue #1370
- Loading branch information
Showing
2 changed files
with
26 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
open HolKernel boolLib | ||
|
||
val _ = new_theory"gh1370"; | ||
|
||
val _ = new_definition ("def", “c = T”); | ||
|
||
val _ = | ||
adjoin_to_theory | ||
{sig_ps = SOME (fn _ => PP.add_string "val ctm : Term.term"), | ||
struct_ps = NONE}; | ||
|
||
val _ = adjoin_after_completion | ||
(fn _ => PP.add_string ("val ctm = Parse.Term ‘c’;\n\n")) | ||
|
||
val _ = export_theory(); |
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,11 @@ | ||
open HolKernel Parse boolLib | ||
|
||
open gh1370Theory | ||
|
||
val _ = new_theory "gh1370child"; | ||
|
||
val _ = type_of gh1370Theory.ctm = bool andalso | ||
(print "ctm has correct type\n";true) orelse | ||
OS.Process.exit OS.Process.failure | ||
|
||
val _ = export_theory(); |