author | wenzelm |
Tue, 30 Oct 2018 22:05:30 +0100 | |
changeset 69211 | 7062639cfdaa |
parent 68997 | 4278947ba336 |
child 69314 | b367c22c3dd8 |
permissions | -rw-r--r-- |
45670 | 1 |
(* Title: Pure/PIDE/markup.ML |
23623 | 2 |
Author: Makarius |
3 |
||
56743 | 4 |
Quasi-abstract markup elements. |
23623 | 5 |
*) |
6 |
||
7 |
signature MARKUP = |
|
8 |
sig |
|
28017 | 9 |
type T = string * Properties.T |
38474
e498dc2eb576
uniform Markup.empty/Markup.Empty in ML and Scala;
wenzelm
parents:
38429
diff
changeset
|
10 |
val empty: T |
e498dc2eb576
uniform Markup.empty/Markup.Empty in ML and Scala;
wenzelm
parents:
38429
diff
changeset
|
11 |
val is_empty: T -> bool |
38229 | 12 |
val properties: Properties.T -> T -> T |
68997 | 13 |
val nameN: string val name: string -> T -> T |
14 |
val xnameN: string val xname: string -> T -> T |
|
38887
1261481ef5e5
Command.State: add reported positions to markup tree, according main message position or Markup.binding/entity/report occurrences in body;
wenzelm
parents:
38871
diff
changeset
|
15 |
val kindN: string |
60744 | 16 |
val serialN: string |
17 |
val serial_properties: int -> Properties.T |
|
52854
92932931bd82
more general Output.result: allow to update arbitrary properties;
wenzelm
parents:
52800
diff
changeset
|
18 |
val instanceN: string |
55828
42ac3cfb89f6
clarified language markup: added "delimited" property;
wenzelm
parents:
55763
diff
changeset
|
19 |
val languageN: string |
55615
bf4bbe72f740
completion of keywords and symbols based on language context;
wenzelm
parents:
55613
diff
changeset
|
20 |
val symbolsN: string |
55828
42ac3cfb89f6
clarified language markup: added "delimited" property;
wenzelm
parents:
55763
diff
changeset
|
21 |
val delimitedN: string |
42ac3cfb89f6
clarified language markup: added "delimited" property;
wenzelm
parents:
55763
diff
changeset
|
22 |
val is_delimited: Properties.T -> bool |
42ac3cfb89f6
clarified language markup: added "delimited" property;
wenzelm
parents:
55763
diff
changeset
|
23 |
val language: {name: string, symbols: bool, antiquotes: bool, delimited: bool} -> T |
42ac3cfb89f6
clarified language markup: added "delimited" property;
wenzelm
parents:
55763
diff
changeset
|
24 |
val language': {name: string, symbols: bool, antiquotes: bool} -> bool -> T |
62231
25f4a9cd8b68
tuned markup, e.g. relevant for Rendering.tooltip;
wenzelm
parents:
61864
diff
changeset
|
25 |
val language_Isar: bool -> T |
55761
213b9811f59f
method language markup, e.g. relevant to prevent outer keyword completion;
wenzelm
parents:
55750
diff
changeset
|
26 |
val language_method: T |
56033 | 27 |
val language_attribute: T |
55828
42ac3cfb89f6
clarified language markup: added "delimited" property;
wenzelm
parents:
55763
diff
changeset
|
28 |
val language_sort: bool -> T |
42ac3cfb89f6
clarified language markup: added "delimited" property;
wenzelm
parents:
55763
diff
changeset
|
29 |
val language_type: bool -> T |
42ac3cfb89f6
clarified language markup: added "delimited" property;
wenzelm
parents:
55763
diff
changeset
|
30 |
val language_term: bool -> T |
42ac3cfb89f6
clarified language markup: added "delimited" property;
wenzelm
parents:
55763
diff
changeset
|
31 |
val language_prop: bool -> T |
42ac3cfb89f6
clarified language markup: added "delimited" property;
wenzelm
parents:
55763
diff
changeset
|
32 |
val language_ML: bool -> T |
56278
2576d3a40ed6
separate tokenization and language context for SML: no symbols, no antiquotes;
wenzelm
parents:
56202
diff
changeset
|
33 |
val language_SML: bool -> T |
69211
7062639cfdaa
added GHC.read_source: read Haskell source text with antiquotations;
wenzelm
parents:
68997
diff
changeset
|
34 |
val language_haskell: bool -> T |
61600
1ca11ddfcc70
clarified completion of explicit symbols (see also f6bd97a587b7, e0e4ac981cf1);
wenzelm
parents:
61598
diff
changeset
|
35 |
val language_document: bool -> T |
55653
528de9a20054
more markup -- complete symbols within antiquotation, notably with broken arguments;
wenzelm
parents:
55615
diff
changeset
|
36 |
val language_antiquotation: T |
55828
42ac3cfb89f6
clarified language markup: added "delimited" property;
wenzelm
parents:
55763
diff
changeset
|
37 |
val language_text: bool -> T |
62520 | 38 |
val language_verbatim: bool -> T |
67429 | 39 |
val language_latex: bool -> T |
55613 | 40 |
val language_rail: T |
56034
1c59b555ac4a
some Markup.language_path to prevent completion of symbols (notably "~") -- always "delimited" for simplicity in contrast to 42ac3cfb89f6;
wenzelm
parents:
56033
diff
changeset
|
41 |
val language_path: T |
62772 | 42 |
val language_mixfix: T |
50201
c26369c9eda6
Isabelle-specific implementation of quasi-abstract markup elements -- back to module arrangement before d83797ef0d2d;
wenzelm
parents:
46894
diff
changeset
|
43 |
val bindingN: string val binding: T |
c26369c9eda6
Isabelle-specific implementation of quasi-abstract markup elements -- back to module arrangement before d83797ef0d2d;
wenzelm
parents:
46894
diff
changeset
|
44 |
val entityN: string val entity: string -> string -> T |
c26369c9eda6
Isabelle-specific implementation of quasi-abstract markup elements -- back to module arrangement before d83797ef0d2d;
wenzelm
parents:
46894
diff
changeset
|
45 |
val get_entity_kind: T -> string option |
c26369c9eda6
Isabelle-specific implementation of quasi-abstract markup elements -- back to module arrangement before d83797ef0d2d;
wenzelm
parents:
46894
diff
changeset
|
46 |
val defN: string |
c26369c9eda6
Isabelle-specific implementation of quasi-abstract markup elements -- back to module arrangement before d83797ef0d2d;
wenzelm
parents:
46894
diff
changeset
|
47 |
val refN: string |
55694
a1184dfb8e00
clarified semantic completion: retain kind.full_name as official item name for history;
wenzelm
parents:
55687
diff
changeset
|
48 |
val completionN: string val completion: T |
55914
c5b752d549e3
clarified init_assignable: make double-sure that initial values are reset;
wenzelm
parents:
55837
diff
changeset
|
49 |
val no_completionN: string val no_completion: T |
50201
c26369c9eda6
Isabelle-specific implementation of quasi-abstract markup elements -- back to module arrangement before d83797ef0d2d;
wenzelm
parents:
46894
diff
changeset
|
50 |
val lineN: string |
58978
e42da880c61e
more position information, e.g. relevant for errors in generated ML source;
wenzelm
parents:
58855
diff
changeset
|
51 |
val end_lineN: string |
50201
c26369c9eda6
Isabelle-specific implementation of quasi-abstract markup elements -- back to module arrangement before d83797ef0d2d;
wenzelm
parents:
46894
diff
changeset
|
52 |
val offsetN: string |
c26369c9eda6
Isabelle-specific implementation of quasi-abstract markup elements -- back to module arrangement before d83797ef0d2d;
wenzelm
parents:
46894
diff
changeset
|
53 |
val end_offsetN: string |
c26369c9eda6
Isabelle-specific implementation of quasi-abstract markup elements -- back to module arrangement before d83797ef0d2d;
wenzelm
parents:
46894
diff
changeset
|
54 |
val fileN: string |
c26369c9eda6
Isabelle-specific implementation of quasi-abstract markup elements -- back to module arrangement before d83797ef0d2d;
wenzelm
parents:
46894
diff
changeset
|
55 |
val idN: string |
c26369c9eda6
Isabelle-specific implementation of quasi-abstract markup elements -- back to module arrangement before d83797ef0d2d;
wenzelm
parents:
46894
diff
changeset
|
56 |
val position_properties': string list |
c26369c9eda6
Isabelle-specific implementation of quasi-abstract markup elements -- back to module arrangement before d83797ef0d2d;
wenzelm
parents:
46894
diff
changeset
|
57 |
val position_properties: string list |
c26369c9eda6
Isabelle-specific implementation of quasi-abstract markup elements -- back to module arrangement before d83797ef0d2d;
wenzelm
parents:
46894
diff
changeset
|
58 |
val positionN: string val position: T |
62806 | 59 |
val expressionN: string val expression: string -> T |
58545
30b75b7958d6
citation tooltip/hyperlink based on open buffers with .bib files;
wenzelm
parents:
58544
diff
changeset
|
60 |
val citationN: string val citation: string -> T |
50201
c26369c9eda6
Isabelle-specific implementation of quasi-abstract markup elements -- back to module arrangement before d83797ef0d2d;
wenzelm
parents:
46894
diff
changeset
|
61 |
val pathN: string val path: string -> T |
54702
3daeba5130f0
added document antiquotation @{url}, which produces formal markup for LaTeX and PIDE;
wenzelm
parents:
53378
diff
changeset
|
62 |
val urlN: string val url: string -> T |
61660
78b371644654
added antiquotation @{doc}, e.g. useful for demonstration purposes;
wenzelm
parents:
61614
diff
changeset
|
63 |
val docN: string val doc: string -> T |
62788 | 64 |
val markupN: string |
65 |
val consistentN: string |
|
62789 | 66 |
val unbreakableN: string |
62786 | 67 |
val block_properties: string list |
62788 | 68 |
val indentN: string |
50201
c26369c9eda6
Isabelle-specific implementation of quasi-abstract markup elements -- back to module arrangement before d83797ef0d2d;
wenzelm
parents:
46894
diff
changeset
|
69 |
val widthN: string |
61864 | 70 |
val blockN: string val block: bool -> int -> T |
61862
e2a9e46ac0fb
support pretty break indent, like underlying ML systems;
wenzelm
parents:
61660
diff
changeset
|
71 |
val breakN: string val break: int -> int -> T |
50201
c26369c9eda6
Isabelle-specific implementation of quasi-abstract markup elements -- back to module arrangement before d83797ef0d2d;
wenzelm
parents:
46894
diff
changeset
|
72 |
val fbreakN: string val fbreak: T |
51570
3633828d80fc
basic support for Pretty.item, which is considered as logical markup and interpreted in Isabelle/Scala, but ignored elsewhere (TTY, latex etc.);
wenzelm
parents:
51228
diff
changeset
|
73 |
val itemN: string val item: T |
56548 | 74 |
val wordsN: string val words: T |
67506
30233285270a
more markup: disable spell-checker for raw latex;
wenzelm
parents:
67429
diff
changeset
|
75 |
val no_wordsN: string val no_words: T |
50201
c26369c9eda6
Isabelle-specific implementation of quasi-abstract markup elements -- back to module arrangement before d83797ef0d2d;
wenzelm
parents:
46894
diff
changeset
|
76 |
val hiddenN: string val hidden: T |
68298
2c3ce27cf4a8
markup for deleted fragments of token source (NB: quoted tokens transform "\123" implicitly);
wenzelm
parents:
68101
diff
changeset
|
77 |
val deleteN: string val delete: T |
56465 | 78 |
val system_optionN: string |
67219 | 79 |
val sessionN: string |
50201
c26369c9eda6
Isabelle-specific implementation of quasi-abstract markup elements -- back to module arrangement before d83797ef0d2d;
wenzelm
parents:
46894
diff
changeset
|
80 |
val theoryN: string |
c26369c9eda6
Isabelle-specific implementation of quasi-abstract markup elements -- back to module arrangement before d83797ef0d2d;
wenzelm
parents:
46894
diff
changeset
|
81 |
val classN: string |
c26369c9eda6
Isabelle-specific implementation of quasi-abstract markup elements -- back to module arrangement before d83797ef0d2d;
wenzelm
parents:
46894
diff
changeset
|
82 |
val type_nameN: string |
c26369c9eda6
Isabelle-specific implementation of quasi-abstract markup elements -- back to module arrangement before d83797ef0d2d;
wenzelm
parents:
46894
diff
changeset
|
83 |
val constantN: string |
c26369c9eda6
Isabelle-specific implementation of quasi-abstract markup elements -- back to module arrangement before d83797ef0d2d;
wenzelm
parents:
46894
diff
changeset
|
84 |
val fixedN: string val fixed: string -> T |
53378
07990ba8c0ea
cases: more position information and PIDE markup;
wenzelm
parents:
53055
diff
changeset
|
85 |
val caseN: string val case_: string -> T |
50201
c26369c9eda6
Isabelle-specific implementation of quasi-abstract markup elements -- back to module arrangement before d83797ef0d2d;
wenzelm
parents:
46894
diff
changeset
|
86 |
val dynamic_factN: string val dynamic_fact: string -> T |
63337 | 87 |
val literal_factN: string val literal_fact: string -> T |
58048
aa6296d09e0e
more explicit Method.modifier with reported position;
wenzelm
parents:
57975
diff
changeset
|
88 |
val method_modifierN: string |
50201
c26369c9eda6
Isabelle-specific implementation of quasi-abstract markup elements -- back to module arrangement before d83797ef0d2d;
wenzelm
parents:
46894
diff
changeset
|
89 |
val tfreeN: string val tfree: T |
c26369c9eda6
Isabelle-specific implementation of quasi-abstract markup elements -- back to module arrangement before d83797ef0d2d;
wenzelm
parents:
46894
diff
changeset
|
90 |
val tvarN: string val tvar: T |
c26369c9eda6
Isabelle-specific implementation of quasi-abstract markup elements -- back to module arrangement before d83797ef0d2d;
wenzelm
parents:
46894
diff
changeset
|
91 |
val freeN: string val free: T |
c26369c9eda6
Isabelle-specific implementation of quasi-abstract markup elements -- back to module arrangement before d83797ef0d2d;
wenzelm
parents:
46894
diff
changeset
|
92 |
val skolemN: string val skolem: T |
c26369c9eda6
Isabelle-specific implementation of quasi-abstract markup elements -- back to module arrangement before d83797ef0d2d;
wenzelm
parents:
46894
diff
changeset
|
93 |
val boundN: string val bound: T |
c26369c9eda6
Isabelle-specific implementation of quasi-abstract markup elements -- back to module arrangement before d83797ef0d2d;
wenzelm
parents:
46894
diff
changeset
|
94 |
val varN: string val var: T |
c26369c9eda6
Isabelle-specific implementation of quasi-abstract markup elements -- back to module arrangement before d83797ef0d2d;
wenzelm
parents:
46894
diff
changeset
|
95 |
val numeralN: string val numeral: T |
c26369c9eda6
Isabelle-specific implementation of quasi-abstract markup elements -- back to module arrangement before d83797ef0d2d;
wenzelm
parents:
46894
diff
changeset
|
96 |
val literalN: string val literal: T |
c26369c9eda6
Isabelle-specific implementation of quasi-abstract markup elements -- back to module arrangement before d83797ef0d2d;
wenzelm
parents:
46894
diff
changeset
|
97 |
val delimiterN: string val delimiter: T |
c26369c9eda6
Isabelle-specific implementation of quasi-abstract markup elements -- back to module arrangement before d83797ef0d2d;
wenzelm
parents:
46894
diff
changeset
|
98 |
val inner_stringN: string val inner_string: T |
55033 | 99 |
val inner_cartoucheN: string val inner_cartouche: T |
50201
c26369c9eda6
Isabelle-specific implementation of quasi-abstract markup elements -- back to module arrangement before d83797ef0d2d;
wenzelm
parents:
46894
diff
changeset
|
100 |
val inner_commentN: string val inner_comment: T |
c26369c9eda6
Isabelle-specific implementation of quasi-abstract markup elements -- back to module arrangement before d83797ef0d2d;
wenzelm
parents:
46894
diff
changeset
|
101 |
val token_rangeN: string val token_range: T |
c26369c9eda6
Isabelle-specific implementation of quasi-abstract markup elements -- back to module arrangement before d83797ef0d2d;
wenzelm
parents:
46894
diff
changeset
|
102 |
val sortingN: string val sorting: T |
c26369c9eda6
Isabelle-specific implementation of quasi-abstract markup elements -- back to module arrangement before d83797ef0d2d;
wenzelm
parents:
46894
diff
changeset
|
103 |
val typingN: string val typing: T |
63347 | 104 |
val class_parameterN: string val class_parameter: T |
55505 | 105 |
val ML_keyword1N: string val ML_keyword1: T |
106 |
val ML_keyword2N: string val ML_keyword2: T |
|
107 |
val ML_keyword3N: string val ML_keyword3: T |
|
50201
c26369c9eda6
Isabelle-specific implementation of quasi-abstract markup elements -- back to module arrangement before d83797ef0d2d;
wenzelm
parents:
46894
diff
changeset
|
108 |
val ML_delimiterN: string val ML_delimiter: T |
c26369c9eda6
Isabelle-specific implementation of quasi-abstract markup elements -- back to module arrangement before d83797ef0d2d;
wenzelm
parents:
46894
diff
changeset
|
109 |
val ML_tvarN: string val ML_tvar: T |
c26369c9eda6
Isabelle-specific implementation of quasi-abstract markup elements -- back to module arrangement before d83797ef0d2d;
wenzelm
parents:
46894
diff
changeset
|
110 |
val ML_numeralN: string val ML_numeral: T |
c26369c9eda6
Isabelle-specific implementation of quasi-abstract markup elements -- back to module arrangement before d83797ef0d2d;
wenzelm
parents:
46894
diff
changeset
|
111 |
val ML_charN: string val ML_char: T |
c26369c9eda6
Isabelle-specific implementation of quasi-abstract markup elements -- back to module arrangement before d83797ef0d2d;
wenzelm
parents:
46894
diff
changeset
|
112 |
val ML_stringN: string val ML_string: T |
c26369c9eda6
Isabelle-specific implementation of quasi-abstract markup elements -- back to module arrangement before d83797ef0d2d;
wenzelm
parents:
46894
diff
changeset
|
113 |
val ML_commentN: string val ML_comment: T |
c26369c9eda6
Isabelle-specific implementation of quasi-abstract markup elements -- back to module arrangement before d83797ef0d2d;
wenzelm
parents:
46894
diff
changeset
|
114 |
val ML_defN: string |
c26369c9eda6
Isabelle-specific implementation of quasi-abstract markup elements -- back to module arrangement before d83797ef0d2d;
wenzelm
parents:
46894
diff
changeset
|
115 |
val ML_openN: string |
55837 | 116 |
val ML_structureN: string |
50201
c26369c9eda6
Isabelle-specific implementation of quasi-abstract markup elements -- back to module arrangement before d83797ef0d2d;
wenzelm
parents:
46894
diff
changeset
|
117 |
val ML_typingN: string val ML_typing: T |
60744 | 118 |
val ML_breakpointN: string val ML_breakpoint: int -> T |
55526 | 119 |
val antiquotedN: string val antiquoted: T |
120 |
val antiquoteN: string val antiquote: T |
|
50201
c26369c9eda6
Isabelle-specific implementation of quasi-abstract markup elements -- back to module arrangement before d83797ef0d2d;
wenzelm
parents:
46894
diff
changeset
|
121 |
val ML_antiquotationN: string |
69211
7062639cfdaa
added GHC.read_source: read Haskell source text with antiquotations;
wenzelm
parents:
68997
diff
changeset
|
122 |
val haskell_antiquotationN: string |
50201
c26369c9eda6
Isabelle-specific implementation of quasi-abstract markup elements -- back to module arrangement before d83797ef0d2d;
wenzelm
parents:
46894
diff
changeset
|
123 |
val document_antiquotationN: string |
c26369c9eda6
Isabelle-specific implementation of quasi-abstract markup elements -- back to module arrangement before d83797ef0d2d;
wenzelm
parents:
46894
diff
changeset
|
124 |
val document_antiquotation_optionN: string |
c26369c9eda6
Isabelle-specific implementation of quasi-abstract markup elements -- back to module arrangement before d83797ef0d2d;
wenzelm
parents:
46894
diff
changeset
|
125 |
val paragraphN: string val paragraph: T |
50545
00bdc48c5f71
explicit text_fold markup, which is used by default in Pretty.chunks/chunks2;
wenzelm
parents:
50543
diff
changeset
|
126 |
val text_foldN: string val text_fold: T |
61449 | 127 |
val markdown_paragraphN: string val markdown_paragraph: T |
67323
d02208cefbdb
PIDE markup for Markdown items (which may consist of multiple paragraphs or lists);
wenzelm
parents:
67322
diff
changeset
|
128 |
val markdown_itemN: string val markdown_item: T |
67336 | 129 |
val markdown_bulletN: string val markdown_bullet: int -> T |
61449 | 130 |
val markdown_listN: string val markdown_list: string -> T |
67336 | 131 |
val itemizeN: string |
132 |
val enumerateN: string |
|
133 |
val descriptionN: string |
|
59795 | 134 |
val inputN: string val input: bool -> Properties.T -> T |
59935 | 135 |
val command_keywordN: string val command_keyword: T |
66066 | 136 |
val commandN: string val command_properties: T -> T |
137 |
val keywordN: string val keyword_properties: T -> T |
|
50201
c26369c9eda6
Isabelle-specific implementation of quasi-abstract markup elements -- back to module arrangement before d83797ef0d2d;
wenzelm
parents:
46894
diff
changeset
|
138 |
val stringN: string val string: T |
59081 | 139 |
val alt_stringN: string val alt_string: T |
50201
c26369c9eda6
Isabelle-specific implementation of quasi-abstract markup elements -- back to module arrangement before d83797ef0d2d;
wenzelm
parents:
46894
diff
changeset
|
140 |
val verbatimN: string val verbatim: T |
55033 | 141 |
val cartoucheN: string val cartouche: T |
50201
c26369c9eda6
Isabelle-specific implementation of quasi-abstract markup elements -- back to module arrangement before d83797ef0d2d;
wenzelm
parents:
46894
diff
changeset
|
142 |
val commentN: string val comment: T |
c26369c9eda6
Isabelle-specific implementation of quasi-abstract markup elements -- back to module arrangement before d83797ef0d2d;
wenzelm
parents:
46894
diff
changeset
|
143 |
val keyword1N: string val keyword1: T |
c26369c9eda6
Isabelle-specific implementation of quasi-abstract markup elements -- back to module arrangement before d83797ef0d2d;
wenzelm
parents:
46894
diff
changeset
|
144 |
val keyword2N: string val keyword2: T |
55763 | 145 |
val keyword3N: string val keyword3: T |
55919
2eb8c13339a5
more explicit quasi_keyword markup, for Args.$$$ material, which is somewhere in between of outer and inner syntax;
wenzelm
parents:
55914
diff
changeset
|
146 |
val quasi_keywordN: string val quasi_keyword: T |
56202 | 147 |
val improperN: string val improper: T |
148 |
val operatorN: string val operator: T |
|
50201
c26369c9eda6
Isabelle-specific implementation of quasi-abstract markup elements -- back to module arrangement before d83797ef0d2d;
wenzelm
parents:
46894
diff
changeset
|
149 |
val elapsedN: string |
c26369c9eda6
Isabelle-specific implementation of quasi-abstract markup elements -- back to module arrangement before d83797ef0d2d;
wenzelm
parents:
46894
diff
changeset
|
150 |
val cpuN: string |
c26369c9eda6
Isabelle-specific implementation of quasi-abstract markup elements -- back to module arrangement before d83797ef0d2d;
wenzelm
parents:
46894
diff
changeset
|
151 |
val gcN: string |
51606
2843cc095a57
additional timing status for implicitly forked terminal proofs -- proper accounting for interactive Timing dockable etc.;
wenzelm
parents:
51570
diff
changeset
|
152 |
val timing_properties: {elapsed: Time.time, cpu: Time.time, gc: Time.time} -> Properties.T |
2843cc095a57
additional timing status for implicitly forked terminal proofs -- proper accounting for interactive Timing dockable etc.;
wenzelm
parents:
51570
diff
changeset
|
153 |
val parse_timing_properties: Properties.T -> {elapsed: Time.time, cpu: Time.time, gc: Time.time} |
51228 | 154 |
val command_timingN: string |
155 |
val command_timing_properties: |
|
156 |
{file: string, offset: int, name: string} -> Time.time -> Properties.T |
|
157 |
val parse_command_timing_properties: |
|
158 |
Properties.T -> ({file: string, offset: int, name: string} * Time.time) option |
|
51606
2843cc095a57
additional timing status for implicitly forked terminal proofs -- proper accounting for interactive Timing dockable etc.;
wenzelm
parents:
51570
diff
changeset
|
159 |
val timingN: string val timing: {elapsed: Time.time, cpu: Time.time, gc: Time.time} -> T |
63474
f66e3c3b0fb1
semantic indentation for unstructured proof scripts;
wenzelm
parents:
63347
diff
changeset
|
160 |
val command_indentN: string val command_indent: int -> T |
50543 | 161 |
val goalN: string val goal: T |
50537
08ce81aeeacc
more subgoal markup information, which is potentially useful to manage proof state output;
wenzelm
parents:
50503
diff
changeset
|
162 |
val subgoalN: string val subgoal: string -> T |
50201
c26369c9eda6
Isabelle-specific implementation of quasi-abstract markup elements -- back to module arrangement before d83797ef0d2d;
wenzelm
parents:
46894
diff
changeset
|
163 |
val taskN: string |
c26369c9eda6
Isabelle-specific implementation of quasi-abstract markup elements -- back to module arrangement before d83797ef0d2d;
wenzelm
parents:
46894
diff
changeset
|
164 |
val acceptedN: string val accepted: T |
c26369c9eda6
Isabelle-specific implementation of quasi-abstract markup elements -- back to module arrangement before d83797ef0d2d;
wenzelm
parents:
46894
diff
changeset
|
165 |
val forkedN: string val forked: T |
c26369c9eda6
Isabelle-specific implementation of quasi-abstract markup elements -- back to module arrangement before d83797ef0d2d;
wenzelm
parents:
46894
diff
changeset
|
166 |
val joinedN: string val joined: T |
c26369c9eda6
Isabelle-specific implementation of quasi-abstract markup elements -- back to module arrangement before d83797ef0d2d;
wenzelm
parents:
46894
diff
changeset
|
167 |
val runningN: string val running: T |
c26369c9eda6
Isabelle-specific implementation of quasi-abstract markup elements -- back to module arrangement before d83797ef0d2d;
wenzelm
parents:
46894
diff
changeset
|
168 |
val finishedN: string val finished: T |
c26369c9eda6
Isabelle-specific implementation of quasi-abstract markup elements -- back to module arrangement before d83797ef0d2d;
wenzelm
parents:
46894
diff
changeset
|
169 |
val failedN: string val failed: T |
68871
f5c76072db55
more explicit status for "canceled" command within theory node;
wenzelm
parents:
68822
diff
changeset
|
170 |
val canceledN: string val canceled: T |
68323 | 171 |
val initializedN: string val initialized: T |
68884
9b97d0b20d95
clarified quasi_consolidated state: ensure that exports are present for ok nodes;
wenzelm
parents:
68871
diff
changeset
|
172 |
val finalizedN: string val finalized: T |
66379
6392766f3c25
maintain "consolidated" status of theory nodes, which means all evals are finished (but not necessarily prints nor imports);
wenzelm
parents:
66066
diff
changeset
|
173 |
val consolidatedN: string val consolidated: T |
50914
fe4714886d92
identify future results more carefully, to avoid odd duplication of error messages, notably from forked goals;
wenzelm
parents:
50845
diff
changeset
|
174 |
val exec_idN: string |
50201
c26369c9eda6
Isabelle-specific implementation of quasi-abstract markup elements -- back to module arrangement before d83797ef0d2d;
wenzelm
parents:
46894
diff
changeset
|
175 |
val initN: string |
61209 | 176 |
val statusN: string val status: T |
177 |
val resultN: string val result: T |
|
178 |
val writelnN: string val writeln: T |
|
179 |
val stateN: string val state: T |
|
180 |
val informationN: string val information: T |
|
181 |
val tracingN: string val tracing: T |
|
182 |
val warningN: string val warning: T |
|
183 |
val legacyN: string val legacy: T |
|
184 |
val errorN: string val error: T |
|
185 |
val systemN: string val system: T |
|
50201
c26369c9eda6
Isabelle-specific implementation of quasi-abstract markup elements -- back to module arrangement before d83797ef0d2d;
wenzelm
parents:
46894
diff
changeset
|
186 |
val protocolN: string |
c26369c9eda6
Isabelle-specific implementation of quasi-abstract markup elements -- back to module arrangement before d83797ef0d2d;
wenzelm
parents:
46894
diff
changeset
|
187 |
val reportN: string val report: T |
c26369c9eda6
Isabelle-specific implementation of quasi-abstract markup elements -- back to module arrangement before d83797ef0d2d;
wenzelm
parents:
46894
diff
changeset
|
188 |
val no_reportN: string val no_report: T |
64677
8dc24130e8fe
more uniform treatment of "bad" like other messages (with serial number);
wenzelm
parents:
63806
diff
changeset
|
189 |
val badN: string val bad: unit -> T |
50500
c94bba7906d2
identify dialogs via official serial and maintain as result message;
wenzelm
parents:
50499
diff
changeset
|
190 |
val intensifyN: string val intensify: T |
50715
8cfd585b9162
prefer old graph browser in Isabelle/jEdit, which still produces better layout;
wenzelm
parents:
50683
diff
changeset
|
191 |
val browserN: string |
50500
c94bba7906d2
identify dialogs via official serial and maintain as result message;
wenzelm
parents:
50499
diff
changeset
|
192 |
val graphviewN: string |
c94bba7906d2
identify dialogs via official serial and maintain as result message;
wenzelm
parents:
50499
diff
changeset
|
193 |
val sendbackN: string |
c94bba7906d2
identify dialogs via official serial and maintain as result message;
wenzelm
parents:
50499
diff
changeset
|
194 |
val paddingN: string |
50842 | 195 |
val padding_line: Properties.entry |
52697
6fb98a20c349
explicit padding on command boundary for "auto" generated sendback -- do not replace the corresponding goal command, but append to it;
wenzelm
parents:
52643
diff
changeset
|
196 |
val padding_command: Properties.entry |
50500
c94bba7906d2
identify dialogs via official serial and maintain as result message;
wenzelm
parents:
50499
diff
changeset
|
197 |
val dialogN: string val dialog: serial -> string -> T |
63681 | 198 |
val jedit_actionN: string |
50201
c26369c9eda6
Isabelle-specific implementation of quasi-abstract markup elements -- back to module arrangement before d83797ef0d2d;
wenzelm
parents:
46894
diff
changeset
|
199 |
val functionN: string |
52563 | 200 |
val assign_update: Properties.T |
50201
c26369c9eda6
Isabelle-specific implementation of quasi-abstract markup elements -- back to module arrangement before d83797ef0d2d;
wenzelm
parents:
46894
diff
changeset
|
201 |
val removed_versions: Properties.T |
52111
1fd184eaa310
explicit management of Session.Protocol_Handlers, with protocol state and functions;
wenzelm
parents:
51990
diff
changeset
|
202 |
val protocol_handler: string -> Properties.T |
50201
c26369c9eda6
Isabelle-specific implementation of quasi-abstract markup elements -- back to module arrangement before d83797ef0d2d;
wenzelm
parents:
46894
diff
changeset
|
203 |
val invoke_scala: string -> string -> Properties.T |
c26369c9eda6
Isabelle-specific implementation of quasi-abstract markup elements -- back to module arrangement before d83797ef0d2d;
wenzelm
parents:
46894
diff
changeset
|
204 |
val cancel_scala: string -> Properties.T |
50842 | 205 |
val ML_statistics: Properties.entry |
50975 | 206 |
val task_statistics: Properties.entry |
51216 | 207 |
val command_timing: Properties.entry |
66873
9953ae603a23
provide theory timing information, similar to command timing but always considered relevant;
wenzelm
parents:
66379
diff
changeset
|
208 |
val theory_timing: Properties.entry |
68088 | 209 |
val exportN: string |
68101 | 210 |
type export_args = |
211 |
{id: string option, serial: serial, theory_name: string, name: string, compress: bool} |
|
68089 | 212 |
val export: export_args -> Properties.T |
50845 | 213 |
val loading_theory: string -> Properties.T |
214 |
val dest_loading_theory: Properties.T -> string option |
|
65313 | 215 |
val build_session_finished: Properties.T |
56864 | 216 |
val print_operationsN: string |
217 |
val print_operations: Properties.T |
|
60842 | 218 |
val debugger_state: string -> Properties.T |
60834 | 219 |
val debugger_output: string -> Properties.T |
57594
037f3b251df5
regular message to refer to Simplifier Trace panel (unused);
wenzelm
parents:
56864
diff
changeset
|
220 |
val simp_trace_panelN: string |
55553
99409ccbe04a
more standard names for protocol and markup elements;
wenzelm
parents:
55551
diff
changeset
|
221 |
val simp_trace_logN: string |
99409ccbe04a
more standard names for protocol and markup elements;
wenzelm
parents:
55551
diff
changeset
|
222 |
val simp_trace_stepN: string |
99409ccbe04a
more standard names for protocol and markup elements;
wenzelm
parents:
55551
diff
changeset
|
223 |
val simp_trace_recurseN: string |
99409ccbe04a
more standard names for protocol and markup elements;
wenzelm
parents:
55551
diff
changeset
|
224 |
val simp_trace_hintN: string |
99409ccbe04a
more standard names for protocol and markup elements;
wenzelm
parents:
55551
diff
changeset
|
225 |
val simp_trace_ignoreN: string |
99409ccbe04a
more standard names for protocol and markup elements;
wenzelm
parents:
55551
diff
changeset
|
226 |
val simp_trace_cancel: serial -> Properties.T |
40131
7cbebd636e79
explicitly qualify type Output.output, which is a slightly odd internal feature;
wenzelm
parents:
39585
diff
changeset
|
227 |
val no_output: Output.output * Output.output |
7cbebd636e79
explicitly qualify type Output.output, which is a slightly odd internal feature;
wenzelm
parents:
39585
diff
changeset
|
228 |
val add_mode: string -> (T -> Output.output * Output.output) -> unit |
7cbebd636e79
explicitly qualify type Output.output, which is a slightly odd internal feature;
wenzelm
parents:
39585
diff
changeset
|
229 |
val output: T -> Output.output * Output.output |
7cbebd636e79
explicitly qualify type Output.output, which is a slightly odd internal feature;
wenzelm
parents:
39585
diff
changeset
|
230 |
val enclose: T -> Output.output -> Output.output |
25552 | 231 |
val markup: T -> string -> string |
59125 | 232 |
val markups: T list -> string -> string |
43665 | 233 |
val markup_only: T -> string |
55956
94d384d621b0
reject internal term names outright, and complete consts instead;
wenzelm
parents:
55919
diff
changeset
|
234 |
val markup_report: string -> string |
23623 | 235 |
end; |
236 |
||
237 |
structure Markup: MARKUP = |
|
238 |
struct |
|
239 |
||
30221 | 240 |
(** markup elements **) |
241 |
||
23658 | 242 |
(* basic markup *) |
23623 | 243 |
|
28017 | 244 |
type T = string * Properties.T; |
23637 | 245 |
|
38474
e498dc2eb576
uniform Markup.empty/Markup.Empty in ML and Scala;
wenzelm
parents:
38429
diff
changeset
|
246 |
val empty = ("", []); |
23637 | 247 |
|
38474
e498dc2eb576
uniform Markup.empty/Markup.Empty in ML and Scala;
wenzelm
parents:
38429
diff
changeset
|
248 |
fun is_empty ("", _) = true |
e498dc2eb576
uniform Markup.empty/Markup.Empty in ML and Scala;
wenzelm
parents:
38429
diff
changeset
|
249 |
| is_empty _ = false; |
27883 | 250 |
|
23794 | 251 |
|
23671 | 252 |
fun properties more_props ((elem, props): T) = |
28017 | 253 |
(elem, fold_rev Properties.put more_props props); |
23671 | 254 |
|
55551 | 255 |
fun markup_elem name = (name, (name, []): T); |
256 |
fun markup_string name prop = (name, fn s => (name, [(prop, s)]): T); |
|
63806 | 257 |
fun markup_int name prop = (name, fn i => (name, [(prop, Value.print_int i)]): T); |
50201
c26369c9eda6
Isabelle-specific implementation of quasi-abstract markup elements -- back to module arrangement before d83797ef0d2d;
wenzelm
parents:
46894
diff
changeset
|
258 |
|
26977 | 259 |
|
38721
ca8b14fa0d0d
added some proof state markup, notably number of subgoals (e.g. for indentation);
wenzelm
parents:
38474
diff
changeset
|
260 |
(* misc properties *) |
26977 | 261 |
|
23658 | 262 |
val nameN = "name"; |
27818 | 263 |
fun name a = properties [(nameN, a)]; |
264 |
||
68997 | 265 |
val xnameN = "xname"; |
266 |
fun xname a = properties [(xnameN, a)]; |
|
267 |
||
23658 | 268 |
val kindN = "kind"; |
23671 | 269 |
|
60744 | 270 |
val serialN = "serial"; |
63806 | 271 |
fun serial_properties i = [(serialN, Value.print_int i)]; |
60744 | 272 |
|
52854
92932931bd82
more general Output.result: allow to update arbitrary properties;
wenzelm
parents:
52800
diff
changeset
|
273 |
val instanceN = "instance"; |
92932931bd82
more general Output.result: allow to update arbitrary properties;
wenzelm
parents:
52800
diff
changeset
|
274 |
|
23658 | 275 |
|
55550 | 276 |
(* embedded languages *) |
277 |
||
55828
42ac3cfb89f6
clarified language markup: added "delimited" property;
wenzelm
parents:
55763
diff
changeset
|
278 |
val languageN = "language"; |
55615
bf4bbe72f740
completion of keywords and symbols based on language context;
wenzelm
parents:
55613
diff
changeset
|
279 |
val symbolsN = "symbols"; |
55666 | 280 |
val antiquotesN = "antiquotes"; |
55828
42ac3cfb89f6
clarified language markup: added "delimited" property;
wenzelm
parents:
55763
diff
changeset
|
281 |
val delimitedN = "delimited" |
42ac3cfb89f6
clarified language markup: added "delimited" property;
wenzelm
parents:
55763
diff
changeset
|
282 |
|
42ac3cfb89f6
clarified language markup: added "delimited" property;
wenzelm
parents:
55763
diff
changeset
|
283 |
fun is_delimited props = |
42ac3cfb89f6
clarified language markup: added "delimited" property;
wenzelm
parents:
55763
diff
changeset
|
284 |
Properties.get props delimitedN = SOME "true"; |
55666 | 285 |
|
55828
42ac3cfb89f6
clarified language markup: added "delimited" property;
wenzelm
parents:
55763
diff
changeset
|
286 |
fun language {name, symbols, antiquotes, delimited} = |
55666 | 287 |
(languageN, |
55828
42ac3cfb89f6
clarified language markup: added "delimited" property;
wenzelm
parents:
55763
diff
changeset
|
288 |
[(nameN, name), |
63806 | 289 |
(symbolsN, Value.print_bool symbols), |
290 |
(antiquotesN, Value.print_bool antiquotes), |
|
291 |
(delimitedN, Value.print_bool delimited)]); |
|
55550 | 292 |
|
55828
42ac3cfb89f6
clarified language markup: added "delimited" property;
wenzelm
parents:
55763
diff
changeset
|
293 |
fun language' {name, symbols, antiquotes} delimited = |
42ac3cfb89f6
clarified language markup: added "delimited" property;
wenzelm
parents:
55763
diff
changeset
|
294 |
language {name = name, symbols = symbols, antiquotes = antiquotes, delimited = delimited}; |
42ac3cfb89f6
clarified language markup: added "delimited" property;
wenzelm
parents:
55763
diff
changeset
|
295 |
|
62231
25f4a9cd8b68
tuned markup, e.g. relevant for Rendering.tooltip;
wenzelm
parents:
61864
diff
changeset
|
296 |
val language_Isar = language' {name = "Isar", symbols = true, antiquotes = false}; |
55828
42ac3cfb89f6
clarified language markup: added "delimited" property;
wenzelm
parents:
55763
diff
changeset
|
297 |
val language_method = |
42ac3cfb89f6
clarified language markup: added "delimited" property;
wenzelm
parents:
55763
diff
changeset
|
298 |
language {name = "method", symbols = true, antiquotes = false, delimited = false}; |
56033 | 299 |
val language_attribute = |
300 |
language {name = "attribute", symbols = true, antiquotes = false, delimited = false}; |
|
55828
42ac3cfb89f6
clarified language markup: added "delimited" property;
wenzelm
parents:
55763
diff
changeset
|
301 |
val language_sort = language' {name = "sort", symbols = true, antiquotes = false}; |
42ac3cfb89f6
clarified language markup: added "delimited" property;
wenzelm
parents:
55763
diff
changeset
|
302 |
val language_type = language' {name = "type", symbols = true, antiquotes = false}; |
42ac3cfb89f6
clarified language markup: added "delimited" property;
wenzelm
parents:
55763
diff
changeset
|
303 |
val language_term = language' {name = "term", symbols = true, antiquotes = false}; |
42ac3cfb89f6
clarified language markup: added "delimited" property;
wenzelm
parents:
55763
diff
changeset
|
304 |
val language_prop = language' {name = "prop", symbols = true, antiquotes = false}; |
42ac3cfb89f6
clarified language markup: added "delimited" property;
wenzelm
parents:
55763
diff
changeset
|
305 |
val language_ML = language' {name = "ML", symbols = false, antiquotes = true}; |
56278
2576d3a40ed6
separate tokenization and language context for SML: no symbols, no antiquotes;
wenzelm
parents:
56202
diff
changeset
|
306 |
val language_SML = language' {name = "SML", symbols = false, antiquotes = false}; |
69211
7062639cfdaa
added GHC.read_source: read Haskell source text with antiquotations;
wenzelm
parents:
68997
diff
changeset
|
307 |
val language_haskell = language' {name = "Haskell", symbols = false, antiquotes = true}; |
61600
1ca11ddfcc70
clarified completion of explicit symbols (see also f6bd97a587b7, e0e4ac981cf1);
wenzelm
parents:
61598
diff
changeset
|
308 |
val language_document = language' {name = "document", symbols = false, antiquotes = true}; |
55828
42ac3cfb89f6
clarified language markup: added "delimited" property;
wenzelm
parents:
55763
diff
changeset
|
309 |
val language_antiquotation = |
42ac3cfb89f6
clarified language markup: added "delimited" property;
wenzelm
parents:
55763
diff
changeset
|
310 |
language {name = "antiquotation", symbols = true, antiquotes = false, delimited = true}; |
42ac3cfb89f6
clarified language markup: added "delimited" property;
wenzelm
parents:
55763
diff
changeset
|
311 |
val language_text = language' {name = "text", symbols = true, antiquotes = false}; |
62772 | 312 |
val language_verbatim = language' {name = "verbatim_text", symbols = true, antiquotes = false}; |
67429 | 313 |
val language_latex = language' {name = "latex", symbols = false, antiquotes = false}; |
55828
42ac3cfb89f6
clarified language markup: added "delimited" property;
wenzelm
parents:
55763
diff
changeset
|
314 |
val language_rail = language {name = "rail", symbols = true, antiquotes = true, delimited = true}; |
56034
1c59b555ac4a
some Markup.language_path to prevent completion of symbols (notably "~") -- always "delimited" for simplicity in contrast to 42ac3cfb89f6;
wenzelm
parents:
56033
diff
changeset
|
315 |
val language_path = language {name = "path", symbols = false, antiquotes = false, delimited = true}; |
62772 | 316 |
val language_mixfix = |
317 |
language {name = "mixfix_annotation", symbols = true, antiquotes = false, delimited = true}; |
|
55550 | 318 |
|
319 |
||
50201
c26369c9eda6
Isabelle-specific implementation of quasi-abstract markup elements -- back to module arrangement before d83797ef0d2d;
wenzelm
parents:
46894
diff
changeset
|
320 |
(* formal entities *) |
c26369c9eda6
Isabelle-specific implementation of quasi-abstract markup elements -- back to module arrangement before d83797ef0d2d;
wenzelm
parents:
46894
diff
changeset
|
321 |
|
c26369c9eda6
Isabelle-specific implementation of quasi-abstract markup elements -- back to module arrangement before d83797ef0d2d;
wenzelm
parents:
46894
diff
changeset
|
322 |
val (bindingN, binding) = markup_elem "binding"; |
c26369c9eda6
Isabelle-specific implementation of quasi-abstract markup elements -- back to module arrangement before d83797ef0d2d;
wenzelm
parents:
46894
diff
changeset
|
323 |
|
c26369c9eda6
Isabelle-specific implementation of quasi-abstract markup elements -- back to module arrangement before d83797ef0d2d;
wenzelm
parents:
46894
diff
changeset
|
324 |
val entityN = "entity"; |
63337 | 325 |
fun entity kind name = |
326 |
(entityN, |
|
327 |
(if name = "" then [] else [(nameN, name)]) @ (if kind = "" then [] else [(kindN, kind)])); |
|
50201
c26369c9eda6
Isabelle-specific implementation of quasi-abstract markup elements -- back to module arrangement before d83797ef0d2d;
wenzelm
parents:
46894
diff
changeset
|
328 |
|
c26369c9eda6
Isabelle-specific implementation of quasi-abstract markup elements -- back to module arrangement before d83797ef0d2d;
wenzelm
parents:
46894
diff
changeset
|
329 |
fun get_entity_kind (name, props) = |
66044 | 330 |
if name = entityN then Properties.get props kindN |
50201
c26369c9eda6
Isabelle-specific implementation of quasi-abstract markup elements -- back to module arrangement before d83797ef0d2d;
wenzelm
parents:
46894
diff
changeset
|
331 |
else NONE; |
c26369c9eda6
Isabelle-specific implementation of quasi-abstract markup elements -- back to module arrangement before d83797ef0d2d;
wenzelm
parents:
46894
diff
changeset
|
332 |
|
c26369c9eda6
Isabelle-specific implementation of quasi-abstract markup elements -- back to module arrangement before d83797ef0d2d;
wenzelm
parents:
46894
diff
changeset
|
333 |
val defN = "def"; |
c26369c9eda6
Isabelle-specific implementation of quasi-abstract markup elements -- back to module arrangement before d83797ef0d2d;
wenzelm
parents:
46894
diff
changeset
|
334 |
val refN = "ref"; |
c26369c9eda6
Isabelle-specific implementation of quasi-abstract markup elements -- back to module arrangement before d83797ef0d2d;
wenzelm
parents:
46894
diff
changeset
|
335 |
|
c26369c9eda6
Isabelle-specific implementation of quasi-abstract markup elements -- back to module arrangement before d83797ef0d2d;
wenzelm
parents:
46894
diff
changeset
|
336 |
|
55672
5e25cc741ab9
support for completion within the formal context;
wenzelm
parents:
55666
diff
changeset
|
337 |
(* completion *) |
5e25cc741ab9
support for completion within the formal context;
wenzelm
parents:
55666
diff
changeset
|
338 |
|
55694
a1184dfb8e00
clarified semantic completion: retain kind.full_name as official item name for history;
wenzelm
parents:
55687
diff
changeset
|
339 |
val (completionN, completion) = markup_elem "completion"; |
55914
c5b752d549e3
clarified init_assignable: make double-sure that initial values are reset;
wenzelm
parents:
55837
diff
changeset
|
340 |
val (no_completionN, no_completion) = markup_elem "no_completion"; |
55672
5e25cc741ab9
support for completion within the formal context;
wenzelm
parents:
55666
diff
changeset
|
341 |
|
5e25cc741ab9
support for completion within the formal context;
wenzelm
parents:
55666
diff
changeset
|
342 |
|
50201
c26369c9eda6
Isabelle-specific implementation of quasi-abstract markup elements -- back to module arrangement before d83797ef0d2d;
wenzelm
parents:
46894
diff
changeset
|
343 |
(* position *) |
c26369c9eda6
Isabelle-specific implementation of quasi-abstract markup elements -- back to module arrangement before d83797ef0d2d;
wenzelm
parents:
46894
diff
changeset
|
344 |
|
c26369c9eda6
Isabelle-specific implementation of quasi-abstract markup elements -- back to module arrangement before d83797ef0d2d;
wenzelm
parents:
46894
diff
changeset
|
345 |
val lineN = "line"; |
58978
e42da880c61e
more position information, e.g. relevant for errors in generated ML source;
wenzelm
parents:
58855
diff
changeset
|
346 |
val end_lineN = "end_line"; |
e42da880c61e
more position information, e.g. relevant for errors in generated ML source;
wenzelm
parents:
58855
diff
changeset
|
347 |
|
50201
c26369c9eda6
Isabelle-specific implementation of quasi-abstract markup elements -- back to module arrangement before d83797ef0d2d;
wenzelm
parents:
46894
diff
changeset
|
348 |
val offsetN = "offset"; |
c26369c9eda6
Isabelle-specific implementation of quasi-abstract markup elements -- back to module arrangement before d83797ef0d2d;
wenzelm
parents:
46894
diff
changeset
|
349 |
val end_offsetN = "end_offset"; |
58978
e42da880c61e
more position information, e.g. relevant for errors in generated ML source;
wenzelm
parents:
58855
diff
changeset
|
350 |
|
50201
c26369c9eda6
Isabelle-specific implementation of quasi-abstract markup elements -- back to module arrangement before d83797ef0d2d;
wenzelm
parents:
46894
diff
changeset
|
351 |
val fileN = "file"; |
c26369c9eda6
Isabelle-specific implementation of quasi-abstract markup elements -- back to module arrangement before d83797ef0d2d;
wenzelm
parents:
46894
diff
changeset
|
352 |
val idN = "id"; |
c26369c9eda6
Isabelle-specific implementation of quasi-abstract markup elements -- back to module arrangement before d83797ef0d2d;
wenzelm
parents:
46894
diff
changeset
|
353 |
|
c26369c9eda6
Isabelle-specific implementation of quasi-abstract markup elements -- back to module arrangement before d83797ef0d2d;
wenzelm
parents:
46894
diff
changeset
|
354 |
val position_properties' = [fileN, idN]; |
c26369c9eda6
Isabelle-specific implementation of quasi-abstract markup elements -- back to module arrangement before d83797ef0d2d;
wenzelm
parents:
46894
diff
changeset
|
355 |
val position_properties = [lineN, offsetN, end_offsetN] @ position_properties'; |
c26369c9eda6
Isabelle-specific implementation of quasi-abstract markup elements -- back to module arrangement before d83797ef0d2d;
wenzelm
parents:
46894
diff
changeset
|
356 |
|
c26369c9eda6
Isabelle-specific implementation of quasi-abstract markup elements -- back to module arrangement before d83797ef0d2d;
wenzelm
parents:
46894
diff
changeset
|
357 |
val (positionN, position) = markup_elem "position"; |
c26369c9eda6
Isabelle-specific implementation of quasi-abstract markup elements -- back to module arrangement before d83797ef0d2d;
wenzelm
parents:
46894
diff
changeset
|
358 |
|
c26369c9eda6
Isabelle-specific implementation of quasi-abstract markup elements -- back to module arrangement before d83797ef0d2d;
wenzelm
parents:
46894
diff
changeset
|
359 |
|
58464 | 360 |
(* expression *) |
361 |
||
62806 | 362 |
val expressionN = "expression"; |
363 |
fun expression kind = (expressionN, if kind = "" then [] else [(kindN, kind)]); |
|
58464 | 364 |
|
365 |
||
58544
340f130b3d38
bibtex support in ML: document antiquotation @{cite} with markup;
wenzelm
parents:
58464
diff
changeset
|
366 |
(* citation *) |
340f130b3d38
bibtex support in ML: document antiquotation @{cite} with markup;
wenzelm
parents:
58464
diff
changeset
|
367 |
|
58545
30b75b7958d6
citation tooltip/hyperlink based on open buffers with .bib files;
wenzelm
parents:
58544
diff
changeset
|
368 |
val (citationN, citation) = markup_string "citation" nameN; |
58544
340f130b3d38
bibtex support in ML: document antiquotation @{cite} with markup;
wenzelm
parents:
58464
diff
changeset
|
369 |
|
340f130b3d38
bibtex support in ML: document antiquotation @{cite} with markup;
wenzelm
parents:
58464
diff
changeset
|
370 |
|
54702
3daeba5130f0
added document antiquotation @{url}, which produces formal markup for LaTeX and PIDE;
wenzelm
parents:
53378
diff
changeset
|
371 |
(* external resources *) |
50201
c26369c9eda6
Isabelle-specific implementation of quasi-abstract markup elements -- back to module arrangement before d83797ef0d2d;
wenzelm
parents:
46894
diff
changeset
|
372 |
|
c26369c9eda6
Isabelle-specific implementation of quasi-abstract markup elements -- back to module arrangement before d83797ef0d2d;
wenzelm
parents:
46894
diff
changeset
|
373 |
val (pathN, path) = markup_string "path" nameN; |
54702
3daeba5130f0
added document antiquotation @{url}, which produces formal markup for LaTeX and PIDE;
wenzelm
parents:
53378
diff
changeset
|
374 |
val (urlN, url) = markup_string "url" nameN; |
61660
78b371644654
added antiquotation @{doc}, e.g. useful for demonstration purposes;
wenzelm
parents:
61614
diff
changeset
|
375 |
val (docN, doc) = markup_string "doc" nameN; |
50201
c26369c9eda6
Isabelle-specific implementation of quasi-abstract markup elements -- back to module arrangement before d83797ef0d2d;
wenzelm
parents:
46894
diff
changeset
|
376 |
|
c26369c9eda6
Isabelle-specific implementation of quasi-abstract markup elements -- back to module arrangement before d83797ef0d2d;
wenzelm
parents:
46894
diff
changeset
|
377 |
|
c26369c9eda6
Isabelle-specific implementation of quasi-abstract markup elements -- back to module arrangement before d83797ef0d2d;
wenzelm
parents:
46894
diff
changeset
|
378 |
(* pretty printing *) |
c26369c9eda6
Isabelle-specific implementation of quasi-abstract markup elements -- back to module arrangement before d83797ef0d2d;
wenzelm
parents:
46894
diff
changeset
|
379 |
|
62783 | 380 |
val markupN = "markup"; |
62786 | 381 |
val consistentN = "consistent"; |
62789 | 382 |
val unbreakableN = "unbreakable"; |
62786 | 383 |
val indentN = "indent"; |
384 |
||
62789 | 385 |
val block_properties = [markupN, consistentN, unbreakableN, indentN]; |
62786 | 386 |
|
61864 | 387 |
val widthN = "width"; |
50201
c26369c9eda6
Isabelle-specific implementation of quasi-abstract markup elements -- back to module arrangement before d83797ef0d2d;
wenzelm
parents:
46894
diff
changeset
|
388 |
|
61864 | 389 |
val blockN = "block"; |
390 |
fun block c i = |
|
391 |
(blockN, |
|
63806 | 392 |
(if c then [(consistentN, Value.print_bool c)] else []) @ |
393 |
(if i <> 0 then [(indentN, Value.print_int i)] else [])); |
|
61864 | 394 |
|
61862
e2a9e46ac0fb
support pretty break indent, like underlying ML systems;
wenzelm
parents:
61660
diff
changeset
|
395 |
val breakN = "break"; |
61864 | 396 |
fun break w i = |
397 |
(breakN, |
|
63806 | 398 |
(if w <> 0 then [(widthN, Value.print_int w)] else []) @ |
399 |
(if i <> 0 then [(indentN, Value.print_int i)] else [])); |
|
50201
c26369c9eda6
Isabelle-specific implementation of quasi-abstract markup elements -- back to module arrangement before d83797ef0d2d;
wenzelm
parents:
46894
diff
changeset
|
400 |
|
c26369c9eda6
Isabelle-specific implementation of quasi-abstract markup elements -- back to module arrangement before d83797ef0d2d;
wenzelm
parents:
46894
diff
changeset
|
401 |
val (fbreakN, fbreak) = markup_elem "fbreak"; |
c26369c9eda6
Isabelle-specific implementation of quasi-abstract markup elements -- back to module arrangement before d83797ef0d2d;
wenzelm
parents:
46894
diff
changeset
|
402 |
|
51570
3633828d80fc
basic support for Pretty.item, which is considered as logical markup and interpreted in Isabelle/Scala, but ignored elsewhere (TTY, latex etc.);
wenzelm
parents:
51228
diff
changeset
|
403 |
val (itemN, item) = markup_elem "item"; |
3633828d80fc
basic support for Pretty.item, which is considered as logical markup and interpreted in Isabelle/Scala, but ignored elsewhere (TTY, latex etc.);
wenzelm
parents:
51228
diff
changeset
|
404 |
|
50201
c26369c9eda6
Isabelle-specific implementation of quasi-abstract markup elements -- back to module arrangement before d83797ef0d2d;
wenzelm
parents:
46894
diff
changeset
|
405 |
|
56548 | 406 |
(* text properties *) |
407 |
||
408 |
val (wordsN, words) = markup_elem "words"; |
|
67506
30233285270a
more markup: disable spell-checker for raw latex;
wenzelm
parents:
67429
diff
changeset
|
409 |
val (no_wordsN, no_words) = markup_elem "no_words"; |
50201
c26369c9eda6
Isabelle-specific implementation of quasi-abstract markup elements -- back to module arrangement before d83797ef0d2d;
wenzelm
parents:
46894
diff
changeset
|
410 |
|
c26369c9eda6
Isabelle-specific implementation of quasi-abstract markup elements -- back to module arrangement before d83797ef0d2d;
wenzelm
parents:
46894
diff
changeset
|
411 |
val (hiddenN, hidden) = markup_elem "hidden"; |
c26369c9eda6
Isabelle-specific implementation of quasi-abstract markup elements -- back to module arrangement before d83797ef0d2d;
wenzelm
parents:
46894
diff
changeset
|
412 |
|
68298
2c3ce27cf4a8
markup for deleted fragments of token source (NB: quoted tokens transform "\123" implicitly);
wenzelm
parents:
68101
diff
changeset
|
413 |
val (deleteN, delete) = markup_elem "delete"; |
2c3ce27cf4a8
markup for deleted fragments of token source (NB: quoted tokens transform "\123" implicitly);
wenzelm
parents:
68101
diff
changeset
|
414 |
|
50201
c26369c9eda6
Isabelle-specific implementation of quasi-abstract markup elements -- back to module arrangement before d83797ef0d2d;
wenzelm
parents:
46894
diff
changeset
|
415 |
|
58048
aa6296d09e0e
more explicit Method.modifier with reported position;
wenzelm
parents:
57975
diff
changeset
|
416 |
(* misc entities *) |
56465 | 417 |
|
418 |
val system_optionN = "system_option"; |
|
50201
c26369c9eda6
Isabelle-specific implementation of quasi-abstract markup elements -- back to module arrangement before d83797ef0d2d;
wenzelm
parents:
46894
diff
changeset
|
419 |
|
67219 | 420 |
val sessionN = "session"; |
421 |
||
50201
c26369c9eda6
Isabelle-specific implementation of quasi-abstract markup elements -- back to module arrangement before d83797ef0d2d;
wenzelm
parents:
46894
diff
changeset
|
422 |
val theoryN = "theory"; |
c26369c9eda6
Isabelle-specific implementation of quasi-abstract markup elements -- back to module arrangement before d83797ef0d2d;
wenzelm
parents:
46894
diff
changeset
|
423 |
val classN = "class"; |
c26369c9eda6
Isabelle-specific implementation of quasi-abstract markup elements -- back to module arrangement before d83797ef0d2d;
wenzelm
parents:
46894
diff
changeset
|
424 |
val type_nameN = "type_name"; |
c26369c9eda6
Isabelle-specific implementation of quasi-abstract markup elements -- back to module arrangement before d83797ef0d2d;
wenzelm
parents:
46894
diff
changeset
|
425 |
val constantN = "constant"; |
c26369c9eda6
Isabelle-specific implementation of quasi-abstract markup elements -- back to module arrangement before d83797ef0d2d;
wenzelm
parents:
46894
diff
changeset
|
426 |
|
c26369c9eda6
Isabelle-specific implementation of quasi-abstract markup elements -- back to module arrangement before d83797ef0d2d;
wenzelm
parents:
46894
diff
changeset
|
427 |
val (fixedN, fixed) = markup_string "fixed" nameN; |
53378
07990ba8c0ea
cases: more position information and PIDE markup;
wenzelm
parents:
53055
diff
changeset
|
428 |
val (caseN, case_) = markup_string "case" nameN; |
50201
c26369c9eda6
Isabelle-specific implementation of quasi-abstract markup elements -- back to module arrangement before d83797ef0d2d;
wenzelm
parents:
46894
diff
changeset
|
429 |
val (dynamic_factN, dynamic_fact) = markup_string "dynamic_fact" nameN; |
63337 | 430 |
val (literal_factN, literal_fact) = markup_string "literal_fact" nameN; |
50201
c26369c9eda6
Isabelle-specific implementation of quasi-abstract markup elements -- back to module arrangement before d83797ef0d2d;
wenzelm
parents:
46894
diff
changeset
|
431 |
|
58048
aa6296d09e0e
more explicit Method.modifier with reported position;
wenzelm
parents:
57975
diff
changeset
|
432 |
val method_modifierN = "method_modifier"; |
aa6296d09e0e
more explicit Method.modifier with reported position;
wenzelm
parents:
57975
diff
changeset
|
433 |
|
50201
c26369c9eda6
Isabelle-specific implementation of quasi-abstract markup elements -- back to module arrangement before d83797ef0d2d;
wenzelm
parents:
46894
diff
changeset
|
434 |
|
c26369c9eda6
Isabelle-specific implementation of quasi-abstract markup elements -- back to module arrangement before d83797ef0d2d;
wenzelm
parents:
46894
diff
changeset
|
435 |
(* inner syntax *) |
c26369c9eda6
Isabelle-specific implementation of quasi-abstract markup elements -- back to module arrangement before d83797ef0d2d;
wenzelm
parents:
46894
diff
changeset
|
436 |
|
c26369c9eda6
Isabelle-specific implementation of quasi-abstract markup elements -- back to module arrangement before d83797ef0d2d;
wenzelm
parents:
46894
diff
changeset
|
437 |
val (tfreeN, tfree) = markup_elem "tfree"; |
c26369c9eda6
Isabelle-specific implementation of quasi-abstract markup elements -- back to module arrangement before d83797ef0d2d;
wenzelm
parents:
46894
diff
changeset
|
438 |
val (tvarN, tvar) = markup_elem "tvar"; |
c26369c9eda6
Isabelle-specific implementation of quasi-abstract markup elements -- back to module arrangement before d83797ef0d2d;
wenzelm
parents:
46894
diff
changeset
|
439 |
val (freeN, free) = markup_elem "free"; |
c26369c9eda6
Isabelle-specific implementation of quasi-abstract markup elements -- back to module arrangement before d83797ef0d2d;
wenzelm
parents:
46894
diff
changeset
|
440 |
val (skolemN, skolem) = markup_elem "skolem"; |
c26369c9eda6
Isabelle-specific implementation of quasi-abstract markup elements -- back to module arrangement before d83797ef0d2d;
wenzelm
parents:
46894
diff
changeset
|
441 |
val (boundN, bound) = markup_elem "bound"; |
c26369c9eda6
Isabelle-specific implementation of quasi-abstract markup elements -- back to module arrangement before d83797ef0d2d;
wenzelm
parents:
46894
diff
changeset
|
442 |
val (varN, var) = markup_elem "var"; |
c26369c9eda6
Isabelle-specific implementation of quasi-abstract markup elements -- back to module arrangement before d83797ef0d2d;
wenzelm
parents:
46894
diff
changeset
|
443 |
val (numeralN, numeral) = markup_elem "numeral"; |
c26369c9eda6
Isabelle-specific implementation of quasi-abstract markup elements -- back to module arrangement before d83797ef0d2d;
wenzelm
parents:
46894
diff
changeset
|
444 |
val (literalN, literal) = markup_elem "literal"; |
c26369c9eda6
Isabelle-specific implementation of quasi-abstract markup elements -- back to module arrangement before d83797ef0d2d;
wenzelm
parents:
46894
diff
changeset
|
445 |
val (delimiterN, delimiter) = markup_elem "delimiter"; |
c26369c9eda6
Isabelle-specific implementation of quasi-abstract markup elements -- back to module arrangement before d83797ef0d2d;
wenzelm
parents:
46894
diff
changeset
|
446 |
val (inner_stringN, inner_string) = markup_elem "inner_string"; |
55033 | 447 |
val (inner_cartoucheN, inner_cartouche) = markup_elem "inner_cartouche"; |
50201
c26369c9eda6
Isabelle-specific implementation of quasi-abstract markup elements -- back to module arrangement before d83797ef0d2d;
wenzelm
parents:
46894
diff
changeset
|
448 |
val (inner_commentN, inner_comment) = markup_elem "inner_comment"; |
c26369c9eda6
Isabelle-specific implementation of quasi-abstract markup elements -- back to module arrangement before d83797ef0d2d;
wenzelm
parents:
46894
diff
changeset
|
449 |
|
c26369c9eda6
Isabelle-specific implementation of quasi-abstract markup elements -- back to module arrangement before d83797ef0d2d;
wenzelm
parents:
46894
diff
changeset
|
450 |
val (token_rangeN, token_range) = markup_elem "token_range"; |
c26369c9eda6
Isabelle-specific implementation of quasi-abstract markup elements -- back to module arrangement before d83797ef0d2d;
wenzelm
parents:
46894
diff
changeset
|
451 |
|
c26369c9eda6
Isabelle-specific implementation of quasi-abstract markup elements -- back to module arrangement before d83797ef0d2d;
wenzelm
parents:
46894
diff
changeset
|
452 |
val (sortingN, sorting) = markup_elem "sorting"; |
c26369c9eda6
Isabelle-specific implementation of quasi-abstract markup elements -- back to module arrangement before d83797ef0d2d;
wenzelm
parents:
46894
diff
changeset
|
453 |
val (typingN, typing) = markup_elem "typing"; |
63347 | 454 |
val (class_parameterN, class_parameter) = markup_elem "class_parameter"; |
50201
c26369c9eda6
Isabelle-specific implementation of quasi-abstract markup elements -- back to module arrangement before d83797ef0d2d;
wenzelm
parents:
46894
diff
changeset
|
455 |
|
c26369c9eda6
Isabelle-specific implementation of quasi-abstract markup elements -- back to module arrangement before d83797ef0d2d;
wenzelm
parents:
46894
diff
changeset
|
456 |
|
60744 | 457 |
(* ML *) |
50201
c26369c9eda6
Isabelle-specific implementation of quasi-abstract markup elements -- back to module arrangement before d83797ef0d2d;
wenzelm
parents:
46894
diff
changeset
|
458 |
|
55505 | 459 |
val (ML_keyword1N, ML_keyword1) = markup_elem "ML_keyword1"; |
460 |
val (ML_keyword2N, ML_keyword2) = markup_elem "ML_keyword2"; |
|
461 |
val (ML_keyword3N, ML_keyword3) = markup_elem "ML_keyword3"; |
|
50201
c26369c9eda6
Isabelle-specific implementation of quasi-abstract markup elements -- back to module arrangement before d83797ef0d2d;
wenzelm
parents:
46894
diff
changeset
|
462 |
val (ML_delimiterN, ML_delimiter) = markup_elem "ML_delimiter"; |
c26369c9eda6
Isabelle-specific implementation of quasi-abstract markup elements -- back to module arrangement before d83797ef0d2d;
wenzelm
parents:
46894
diff
changeset
|
463 |
val (ML_tvarN, ML_tvar) = markup_elem "ML_tvar"; |
c26369c9eda6
Isabelle-specific implementation of quasi-abstract markup elements -- back to module arrangement before d83797ef0d2d;
wenzelm
parents:
46894
diff
changeset
|
464 |
val (ML_numeralN, ML_numeral) = markup_elem "ML_numeral"; |
c26369c9eda6
Isabelle-specific implementation of quasi-abstract markup elements -- back to module arrangement before d83797ef0d2d;
wenzelm
parents:
46894
diff
changeset
|
465 |
val (ML_charN, ML_char) = markup_elem "ML_char"; |
c26369c9eda6
Isabelle-specific implementation of quasi-abstract markup elements -- back to module arrangement before d83797ef0d2d;
wenzelm
parents:
46894
diff
changeset
|
466 |
val (ML_stringN, ML_string) = markup_elem "ML_string"; |
c26369c9eda6
Isabelle-specific implementation of quasi-abstract markup elements -- back to module arrangement before d83797ef0d2d;
wenzelm
parents:
46894
diff
changeset
|
467 |
val (ML_commentN, ML_comment) = markup_elem "ML_comment"; |
c26369c9eda6
Isabelle-specific implementation of quasi-abstract markup elements -- back to module arrangement before d83797ef0d2d;
wenzelm
parents:
46894
diff
changeset
|
468 |
|
c26369c9eda6
Isabelle-specific implementation of quasi-abstract markup elements -- back to module arrangement before d83797ef0d2d;
wenzelm
parents:
46894
diff
changeset
|
469 |
val ML_defN = "ML_def"; |
c26369c9eda6
Isabelle-specific implementation of quasi-abstract markup elements -- back to module arrangement before d83797ef0d2d;
wenzelm
parents:
46894
diff
changeset
|
470 |
val ML_openN = "ML_open"; |
55837 | 471 |
val ML_structureN = "ML_structure"; |
50201
c26369c9eda6
Isabelle-specific implementation of quasi-abstract markup elements -- back to module arrangement before d83797ef0d2d;
wenzelm
parents:
46894
diff
changeset
|
472 |
val (ML_typingN, ML_typing) = markup_elem "ML_typing"; |
c26369c9eda6
Isabelle-specific implementation of quasi-abstract markup elements -- back to module arrangement before d83797ef0d2d;
wenzelm
parents:
46894
diff
changeset
|
473 |
|
60744 | 474 |
val (ML_breakpointN, ML_breakpoint) = markup_int "ML_breakpoint" serialN; |
475 |
||
50201
c26369c9eda6
Isabelle-specific implementation of quasi-abstract markup elements -- back to module arrangement before d83797ef0d2d;
wenzelm
parents:
46894
diff
changeset
|
476 |
|
55550 | 477 |
(* antiquotations *) |
50201
c26369c9eda6
Isabelle-specific implementation of quasi-abstract markup elements -- back to module arrangement before d83797ef0d2d;
wenzelm
parents:
46894
diff
changeset
|
478 |
|
55526 | 479 |
val (antiquotedN, antiquoted) = markup_elem "antiquoted"; |
480 |
val (antiquoteN, antiquote) = markup_elem "antiquote"; |
|
481 |
||
50201
c26369c9eda6
Isabelle-specific implementation of quasi-abstract markup elements -- back to module arrangement before d83797ef0d2d;
wenzelm
parents:
46894
diff
changeset
|
482 |
val ML_antiquotationN = "ML_antiquotation"; |
69211
7062639cfdaa
added GHC.read_source: read Haskell source text with antiquotations;
wenzelm
parents:
68997
diff
changeset
|
483 |
val haskell_antiquotationN = "Haskell_antiquotation"; |
50201
c26369c9eda6
Isabelle-specific implementation of quasi-abstract markup elements -- back to module arrangement before d83797ef0d2d;
wenzelm
parents:
46894
diff
changeset
|
484 |
val document_antiquotationN = "document_antiquotation"; |
c26369c9eda6
Isabelle-specific implementation of quasi-abstract markup elements -- back to module arrangement before d83797ef0d2d;
wenzelm
parents:
46894
diff
changeset
|
485 |
val document_antiquotation_optionN = "document_antiquotation_option"; |
c26369c9eda6
Isabelle-specific implementation of quasi-abstract markup elements -- back to module arrangement before d83797ef0d2d;
wenzelm
parents:
46894
diff
changeset
|
486 |
|
c26369c9eda6
Isabelle-specific implementation of quasi-abstract markup elements -- back to module arrangement before d83797ef0d2d;
wenzelm
parents:
46894
diff
changeset
|
487 |
|
c26369c9eda6
Isabelle-specific implementation of quasi-abstract markup elements -- back to module arrangement before d83797ef0d2d;
wenzelm
parents:
46894
diff
changeset
|
488 |
(* text structure *) |
c26369c9eda6
Isabelle-specific implementation of quasi-abstract markup elements -- back to module arrangement before d83797ef0d2d;
wenzelm
parents:
46894
diff
changeset
|
489 |
|
c26369c9eda6
Isabelle-specific implementation of quasi-abstract markup elements -- back to module arrangement before d83797ef0d2d;
wenzelm
parents:
46894
diff
changeset
|
490 |
val (paragraphN, paragraph) = markup_elem "paragraph"; |
50545
00bdc48c5f71
explicit text_fold markup, which is used by default in Pretty.chunks/chunks2;
wenzelm
parents:
50543
diff
changeset
|
491 |
val (text_foldN, text_fold) = markup_elem "text_fold"; |
50201
c26369c9eda6
Isabelle-specific implementation of quasi-abstract markup elements -- back to module arrangement before d83797ef0d2d;
wenzelm
parents:
46894
diff
changeset
|
492 |
|
c26369c9eda6
Isabelle-specific implementation of quasi-abstract markup elements -- back to module arrangement before d83797ef0d2d;
wenzelm
parents:
46894
diff
changeset
|
493 |
|
61449 | 494 |
(* Markdown document structure *) |
495 |
||
496 |
val (markdown_paragraphN, markdown_paragraph) = markup_elem "markdown_paragraph"; |
|
67323
d02208cefbdb
PIDE markup for Markdown items (which may consist of multiple paragraphs or lists);
wenzelm
parents:
67322
diff
changeset
|
497 |
val (markdown_itemN, markdown_item) = markup_elem "markdown_item"; |
67336 | 498 |
val (markdown_bulletN, markdown_bullet) = markup_int "markdown_bullet" "depth"; |
61449 | 499 |
val (markdown_listN, markdown_list) = markup_string "markdown_list" kindN; |
67336 | 500 |
|
501 |
val itemizeN = "itemize"; |
|
502 |
val enumerateN = "enumerate"; |
|
503 |
val descriptionN = "description"; |
|
61449 | 504 |
|
505 |
||
59795 | 506 |
(* formal input *) |
507 |
||
508 |
val inputN = "input"; |
|
63806 | 509 |
fun input delimited props = (inputN, (delimitedN, Value.print_bool delimited) :: props); |
59795 | 510 |
|
511 |
||
50201
c26369c9eda6
Isabelle-specific implementation of quasi-abstract markup elements -- back to module arrangement before d83797ef0d2d;
wenzelm
parents:
46894
diff
changeset
|
512 |
(* outer syntax *) |
c26369c9eda6
Isabelle-specific implementation of quasi-abstract markup elements -- back to module arrangement before d83797ef0d2d;
wenzelm
parents:
46894
diff
changeset
|
513 |
|
59935 | 514 |
val (command_keywordN, command_keyword) = markup_elem "command_keyword"; |
66044 | 515 |
|
66066 | 516 |
val commandN = "command"; val command_properties = properties [(kindN, commandN)]; |
517 |
val keywordN = "keyword"; val keyword_properties = properties [(kindN, keywordN)]; |
|
518 |
||
55744
4a4e5686e091
clarified token markup: keyword1/keyword2 is for syntax, and "command" the entity kind;
wenzelm
parents:
55694
diff
changeset
|
519 |
val (keyword1N, keyword1) = markup_elem "keyword1"; |
4a4e5686e091
clarified token markup: keyword1/keyword2 is for syntax, and "command" the entity kind;
wenzelm
parents:
55694
diff
changeset
|
520 |
val (keyword2N, keyword2) = markup_elem "keyword2"; |
55763 | 521 |
val (keyword3N, keyword3) = markup_elem "keyword3"; |
55919
2eb8c13339a5
more explicit quasi_keyword markup, for Args.$$$ material, which is somewhere in between of outer and inner syntax;
wenzelm
parents:
55914
diff
changeset
|
522 |
val (quasi_keywordN, quasi_keyword) = markup_elem "quasi_keyword"; |
56202 | 523 |
val (improperN, improper) = markup_elem "improper"; |
50201
c26369c9eda6
Isabelle-specific implementation of quasi-abstract markup elements -- back to module arrangement before d83797ef0d2d;
wenzelm
parents:
46894
diff
changeset
|
524 |
val (operatorN, operator) = markup_elem "operator"; |
c26369c9eda6
Isabelle-specific implementation of quasi-abstract markup elements -- back to module arrangement before d83797ef0d2d;
wenzelm
parents:
46894
diff
changeset
|
525 |
val (stringN, string) = markup_elem "string"; |
59081 | 526 |
val (alt_stringN, alt_string) = markup_elem "alt_string"; |
50201
c26369c9eda6
Isabelle-specific implementation of quasi-abstract markup elements -- back to module arrangement before d83797ef0d2d;
wenzelm
parents:
46894
diff
changeset
|
527 |
val (verbatimN, verbatim) = markup_elem "verbatim"; |
55033 | 528 |
val (cartoucheN, cartouche) = markup_elem "cartouche"; |
50201
c26369c9eda6
Isabelle-specific implementation of quasi-abstract markup elements -- back to module arrangement before d83797ef0d2d;
wenzelm
parents:
46894
diff
changeset
|
529 |
val (commentN, comment) = markup_elem "comment"; |
c26369c9eda6
Isabelle-specific implementation of quasi-abstract markup elements -- back to module arrangement before d83797ef0d2d;
wenzelm
parents:
46894
diff
changeset
|
530 |
|
c26369c9eda6
Isabelle-specific implementation of quasi-abstract markup elements -- back to module arrangement before d83797ef0d2d;
wenzelm
parents:
46894
diff
changeset
|
531 |
|
c26369c9eda6
Isabelle-specific implementation of quasi-abstract markup elements -- back to module arrangement before d83797ef0d2d;
wenzelm
parents:
46894
diff
changeset
|
532 |
(* timing *) |
c26369c9eda6
Isabelle-specific implementation of quasi-abstract markup elements -- back to module arrangement before d83797ef0d2d;
wenzelm
parents:
46894
diff
changeset
|
533 |
|
c26369c9eda6
Isabelle-specific implementation of quasi-abstract markup elements -- back to module arrangement before d83797ef0d2d;
wenzelm
parents:
46894
diff
changeset
|
534 |
val elapsedN = "elapsed"; |
c26369c9eda6
Isabelle-specific implementation of quasi-abstract markup elements -- back to module arrangement before d83797ef0d2d;
wenzelm
parents:
46894
diff
changeset
|
535 |
val cpuN = "cpu"; |
c26369c9eda6
Isabelle-specific implementation of quasi-abstract markup elements -- back to module arrangement before d83797ef0d2d;
wenzelm
parents:
46894
diff
changeset
|
536 |
val gcN = "gc"; |
c26369c9eda6
Isabelle-specific implementation of quasi-abstract markup elements -- back to module arrangement before d83797ef0d2d;
wenzelm
parents:
46894
diff
changeset
|
537 |
|
50781 | 538 |
fun timing_properties {elapsed, cpu, gc} = |
67000
1698e9ccef2d
more portable print_time, notably for occasional negative (!) elapsed time of theory_timing;
wenzelm
parents:
66873
diff
changeset
|
539 |
[(elapsedN, Value.print_time elapsed), |
1698e9ccef2d
more portable print_time, notably for occasional negative (!) elapsed time of theory_timing;
wenzelm
parents:
66873
diff
changeset
|
540 |
(cpuN, Value.print_time cpu), |
1698e9ccef2d
more portable print_time, notably for occasional negative (!) elapsed time of theory_timing;
wenzelm
parents:
66873
diff
changeset
|
541 |
(gcN, Value.print_time gc)]; |
50781 | 542 |
|
51665 | 543 |
fun parse_timing_properties props = |
544 |
{elapsed = Properties.seconds props elapsedN, |
|
545 |
cpu = Properties.seconds props cpuN, |
|
546 |
gc = Properties.seconds props gcN}; |
|
51218
6425a0d3b7ac
support for build passing timings from Scala to ML;
wenzelm
parents:
51217
diff
changeset
|
547 |
|
51665 | 548 |
val timingN = "timing"; |
549 |
fun timing t = (timingN, timing_properties t); |
|
51218
6425a0d3b7ac
support for build passing timings from Scala to ML;
wenzelm
parents:
51217
diff
changeset
|
550 |
|
51228 | 551 |
|
552 |
(* command timing *) |
|
553 |
||
554 |
val command_timingN = "command_timing"; |
|
555 |
||
556 |
fun command_timing_properties {file, offset, name} elapsed = |
|
63806 | 557 |
[(fileN, file), (offsetN, Value.print_int offset), |
67000
1698e9ccef2d
more portable print_time, notably for occasional negative (!) elapsed time of theory_timing;
wenzelm
parents:
66873
diff
changeset
|
558 |
(nameN, name), (elapsedN, Value.print_time elapsed)]; |
51228 | 559 |
|
560 |
fun parse_command_timing_properties props = |
|
561 |
(case (Properties.get props fileN, Properties.get props offsetN, Properties.get props nameN) of |
|
562 |
(SOME file, SOME offset, SOME name) => |
|
63806 | 563 |
SOME ({file = file, offset = Value.parse_int offset, name = name}, |
51665 | 564 |
Properties.seconds props elapsedN) |
51228 | 565 |
| _ => NONE); |
566 |
||
567 |
||
63474
f66e3c3b0fb1
semantic indentation for unstructured proof scripts;
wenzelm
parents:
63347
diff
changeset
|
568 |
(* indentation *) |
f66e3c3b0fb1
semantic indentation for unstructured proof scripts;
wenzelm
parents:
63347
diff
changeset
|
569 |
|
f66e3c3b0fb1
semantic indentation for unstructured proof scripts;
wenzelm
parents:
63347
diff
changeset
|
570 |
val (command_indentN, command_indent) = markup_int "command_indent" indentN; |
f66e3c3b0fb1
semantic indentation for unstructured proof scripts;
wenzelm
parents:
63347
diff
changeset
|
571 |
|
f66e3c3b0fb1
semantic indentation for unstructured proof scripts;
wenzelm
parents:
63347
diff
changeset
|
572 |
|
f66e3c3b0fb1
semantic indentation for unstructured proof scripts;
wenzelm
parents:
63347
diff
changeset
|
573 |
(* goals *) |
50201
c26369c9eda6
Isabelle-specific implementation of quasi-abstract markup elements -- back to module arrangement before d83797ef0d2d;
wenzelm
parents:
46894
diff
changeset
|
574 |
|
50543 | 575 |
val (goalN, goal) = markup_elem "goal"; |
50537
08ce81aeeacc
more subgoal markup information, which is potentially useful to manage proof state output;
wenzelm
parents:
50503
diff
changeset
|
576 |
val (subgoalN, subgoal) = markup_string "subgoal" nameN; |
50215 | 577 |
|
50450
358b6020f8b6
generalized notion of active area, where sendback is just one application;
wenzelm
parents:
50255
diff
changeset
|
578 |
|
50201
c26369c9eda6
Isabelle-specific implementation of quasi-abstract markup elements -- back to module arrangement before d83797ef0d2d;
wenzelm
parents:
46894
diff
changeset
|
579 |
(* command status *) |
c26369c9eda6
Isabelle-specific implementation of quasi-abstract markup elements -- back to module arrangement before d83797ef0d2d;
wenzelm
parents:
46894
diff
changeset
|
580 |
|
c26369c9eda6
Isabelle-specific implementation of quasi-abstract markup elements -- back to module arrangement before d83797ef0d2d;
wenzelm
parents:
46894
diff
changeset
|
581 |
val taskN = "task"; |
c26369c9eda6
Isabelle-specific implementation of quasi-abstract markup elements -- back to module arrangement before d83797ef0d2d;
wenzelm
parents:
46894
diff
changeset
|
582 |
|
c26369c9eda6
Isabelle-specific implementation of quasi-abstract markup elements -- back to module arrangement before d83797ef0d2d;
wenzelm
parents:
46894
diff
changeset
|
583 |
val (acceptedN, accepted) = markup_elem "accepted"; |
c26369c9eda6
Isabelle-specific implementation of quasi-abstract markup elements -- back to module arrangement before d83797ef0d2d;
wenzelm
parents:
46894
diff
changeset
|
584 |
val (forkedN, forked) = markup_elem "forked"; |
c26369c9eda6
Isabelle-specific implementation of quasi-abstract markup elements -- back to module arrangement before d83797ef0d2d;
wenzelm
parents:
46894
diff
changeset
|
585 |
val (joinedN, joined) = markup_elem "joined"; |
c26369c9eda6
Isabelle-specific implementation of quasi-abstract markup elements -- back to module arrangement before d83797ef0d2d;
wenzelm
parents:
46894
diff
changeset
|
586 |
val (runningN, running) = markup_elem "running"; |
c26369c9eda6
Isabelle-specific implementation of quasi-abstract markup elements -- back to module arrangement before d83797ef0d2d;
wenzelm
parents:
46894
diff
changeset
|
587 |
val (finishedN, finished) = markup_elem "finished"; |
c26369c9eda6
Isabelle-specific implementation of quasi-abstract markup elements -- back to module arrangement before d83797ef0d2d;
wenzelm
parents:
46894
diff
changeset
|
588 |
val (failedN, failed) = markup_elem "failed"; |
68871
f5c76072db55
more explicit status for "canceled" command within theory node;
wenzelm
parents:
68822
diff
changeset
|
589 |
val (canceledN, canceled) = markup_elem "canceled"; |
68323 | 590 |
val (initializedN, initialized) = markup_elem "initialized"; |
68884
9b97d0b20d95
clarified quasi_consolidated state: ensure that exports are present for ok nodes;
wenzelm
parents:
68871
diff
changeset
|
591 |
val (finalizedN, finalized) = markup_elem "finalized"; |
66379
6392766f3c25
maintain "consolidated" status of theory nodes, which means all evals are finished (but not necessarily prints nor imports);
wenzelm
parents:
66066
diff
changeset
|
592 |
val (consolidatedN, consolidated) = markup_elem "consolidated"; |
50201
c26369c9eda6
Isabelle-specific implementation of quasi-abstract markup elements -- back to module arrangement before d83797ef0d2d;
wenzelm
parents:
46894
diff
changeset
|
593 |
|
c26369c9eda6
Isabelle-specific implementation of quasi-abstract markup elements -- back to module arrangement before d83797ef0d2d;
wenzelm
parents:
46894
diff
changeset
|
594 |
|
c26369c9eda6
Isabelle-specific implementation of quasi-abstract markup elements -- back to module arrangement before d83797ef0d2d;
wenzelm
parents:
46894
diff
changeset
|
595 |
(* messages *) |
c26369c9eda6
Isabelle-specific implementation of quasi-abstract markup elements -- back to module arrangement before d83797ef0d2d;
wenzelm
parents:
46894
diff
changeset
|
596 |
|
50914
fe4714886d92
identify future results more carefully, to avoid odd duplication of error messages, notably from forked goals;
wenzelm
parents:
50845
diff
changeset
|
597 |
val exec_idN = "exec_id"; |
50201
c26369c9eda6
Isabelle-specific implementation of quasi-abstract markup elements -- back to module arrangement before d83797ef0d2d;
wenzelm
parents:
46894
diff
changeset
|
598 |
|
c26369c9eda6
Isabelle-specific implementation of quasi-abstract markup elements -- back to module arrangement before d83797ef0d2d;
wenzelm
parents:
46894
diff
changeset
|
599 |
val initN = "init"; |
61209 | 600 |
val (statusN, status) = markup_elem "status"; |
601 |
val (resultN, result) = markup_elem "result"; |
|
602 |
val (writelnN, writeln) = markup_elem "writeln"; |
|
603 |
val (stateN, state) = markup_elem "state" |
|
604 |
val (informationN, information) = markup_elem "information"; |
|
605 |
val (tracingN, tracing) = markup_elem "tracing"; |
|
606 |
val (warningN, warning) = markup_elem "warning"; |
|
607 |
val (legacyN, legacy) = markup_elem "legacy"; |
|
608 |
val (errorN, error) = markup_elem "error"; |
|
609 |
val (systemN, system) = markup_elem "system"; |
|
50201
c26369c9eda6
Isabelle-specific implementation of quasi-abstract markup elements -- back to module arrangement before d83797ef0d2d;
wenzelm
parents:
46894
diff
changeset
|
610 |
val protocolN = "protocol"; |
c26369c9eda6
Isabelle-specific implementation of quasi-abstract markup elements -- back to module arrangement before d83797ef0d2d;
wenzelm
parents:
46894
diff
changeset
|
611 |
|
c26369c9eda6
Isabelle-specific implementation of quasi-abstract markup elements -- back to module arrangement before d83797ef0d2d;
wenzelm
parents:
46894
diff
changeset
|
612 |
val (reportN, report) = markup_elem "report"; |
c26369c9eda6
Isabelle-specific implementation of quasi-abstract markup elements -- back to module arrangement before d83797ef0d2d;
wenzelm
parents:
46894
diff
changeset
|
613 |
val (no_reportN, no_report) = markup_elem "no_report"; |
c26369c9eda6
Isabelle-specific implementation of quasi-abstract markup elements -- back to module arrangement before d83797ef0d2d;
wenzelm
parents:
46894
diff
changeset
|
614 |
|
64677
8dc24130e8fe
more uniform treatment of "bad" like other messages (with serial number);
wenzelm
parents:
63806
diff
changeset
|
615 |
val badN = "bad"; |
8dc24130e8fe
more uniform treatment of "bad" like other messages (with serial number);
wenzelm
parents:
63806
diff
changeset
|
616 |
fun bad () = (badN, serial_properties (serial ())); |
50201
c26369c9eda6
Isabelle-specific implementation of quasi-abstract markup elements -- back to module arrangement before d83797ef0d2d;
wenzelm
parents:
46894
diff
changeset
|
617 |
|
50500
c94bba7906d2
identify dialogs via official serial and maintain as result message;
wenzelm
parents:
50499
diff
changeset
|
618 |
val (intensifyN, intensify) = markup_elem "intensify"; |
c94bba7906d2
identify dialogs via official serial and maintain as result message;
wenzelm
parents:
50499
diff
changeset
|
619 |
|
c94bba7906d2
identify dialogs via official serial and maintain as result message;
wenzelm
parents:
50499
diff
changeset
|
620 |
|
c94bba7906d2
identify dialogs via official serial and maintain as result message;
wenzelm
parents:
50499
diff
changeset
|
621 |
(* active areas *) |
c94bba7906d2
identify dialogs via official serial and maintain as result message;
wenzelm
parents:
50499
diff
changeset
|
622 |
|
50715
8cfd585b9162
prefer old graph browser in Isabelle/jEdit, which still produces better layout;
wenzelm
parents:
50683
diff
changeset
|
623 |
val browserN = "browser" |
50500
c94bba7906d2
identify dialogs via official serial and maintain as result message;
wenzelm
parents:
50499
diff
changeset
|
624 |
val graphviewN = "graphview"; |
c94bba7906d2
identify dialogs via official serial and maintain as result message;
wenzelm
parents:
50499
diff
changeset
|
625 |
|
c94bba7906d2
identify dialogs via official serial and maintain as result message;
wenzelm
parents:
50499
diff
changeset
|
626 |
val sendbackN = "sendback"; |
c94bba7906d2
identify dialogs via official serial and maintain as result message;
wenzelm
parents:
50499
diff
changeset
|
627 |
val paddingN = "padding"; |
52697
6fb98a20c349
explicit padding on command boundary for "auto" generated sendback -- do not replace the corresponding goal command, but append to it;
wenzelm
parents:
52643
diff
changeset
|
628 |
val padding_line = (paddingN, "line"); |
6fb98a20c349
explicit padding on command boundary for "auto" generated sendback -- do not replace the corresponding goal command, but append to it;
wenzelm
parents:
52643
diff
changeset
|
629 |
val padding_command = (paddingN, "command"); |
50500
c94bba7906d2
identify dialogs via official serial and maintain as result message;
wenzelm
parents:
50499
diff
changeset
|
630 |
|
c94bba7906d2
identify dialogs via official serial and maintain as result message;
wenzelm
parents:
50499
diff
changeset
|
631 |
val dialogN = "dialog"; |
63806 | 632 |
fun dialog i result = (dialogN, [(serialN, Value.print_int i), (resultN, result)]); |
50500
c94bba7906d2
identify dialogs via official serial and maintain as result message;
wenzelm
parents:
50499
diff
changeset
|
633 |
|
63681 | 634 |
val jedit_actionN = "jedit_action"; |
635 |
||
50201
c26369c9eda6
Isabelle-specific implementation of quasi-abstract markup elements -- back to module arrangement before d83797ef0d2d;
wenzelm
parents:
46894
diff
changeset
|
636 |
|
c26369c9eda6
Isabelle-specific implementation of quasi-abstract markup elements -- back to module arrangement before d83797ef0d2d;
wenzelm
parents:
46894
diff
changeset
|
637 |
(* protocol message functions *) |
c26369c9eda6
Isabelle-specific implementation of quasi-abstract markup elements -- back to module arrangement before d83797ef0d2d;
wenzelm
parents:
46894
diff
changeset
|
638 |
|
c26369c9eda6
Isabelle-specific implementation of quasi-abstract markup elements -- back to module arrangement before d83797ef0d2d;
wenzelm
parents:
46894
diff
changeset
|
639 |
val functionN = "function" |
c26369c9eda6
Isabelle-specific implementation of quasi-abstract markup elements -- back to module arrangement before d83797ef0d2d;
wenzelm
parents:
46894
diff
changeset
|
640 |
|
52563 | 641 |
val assign_update = [(functionN, "assign_update")]; |
50201
c26369c9eda6
Isabelle-specific implementation of quasi-abstract markup elements -- back to module arrangement before d83797ef0d2d;
wenzelm
parents:
46894
diff
changeset
|
642 |
val removed_versions = [(functionN, "removed_versions")]; |
c26369c9eda6
Isabelle-specific implementation of quasi-abstract markup elements -- back to module arrangement before d83797ef0d2d;
wenzelm
parents:
46894
diff
changeset
|
643 |
|
52111
1fd184eaa310
explicit management of Session.Protocol_Handlers, with protocol state and functions;
wenzelm
parents:
51990
diff
changeset
|
644 |
fun protocol_handler name = [(functionN, "protocol_handler"), (nameN, name)]; |
1fd184eaa310
explicit management of Session.Protocol_Handlers, with protocol state and functions;
wenzelm
parents:
51990
diff
changeset
|
645 |
|
50201
c26369c9eda6
Isabelle-specific implementation of quasi-abstract markup elements -- back to module arrangement before d83797ef0d2d;
wenzelm
parents:
46894
diff
changeset
|
646 |
fun invoke_scala name id = [(functionN, "invoke_scala"), (nameN, name), (idN, id)]; |
c26369c9eda6
Isabelle-specific implementation of quasi-abstract markup elements -- back to module arrangement before d83797ef0d2d;
wenzelm
parents:
46894
diff
changeset
|
647 |
fun cancel_scala id = [(functionN, "cancel_scala"), (idN, id)]; |
c26369c9eda6
Isabelle-specific implementation of quasi-abstract markup elements -- back to module arrangement before d83797ef0d2d;
wenzelm
parents:
46894
diff
changeset
|
648 |
|
50683 | 649 |
val ML_statistics = (functionN, "ML_statistics"); |
50255 | 650 |
|
50975 | 651 |
val task_statistics = (functionN, "task_statistics"); |
652 |
||
51216 | 653 |
val command_timing = (functionN, "command_timing"); |
654 |
||
66873
9953ae603a23
provide theory timing information, similar to command timing but always considered relevant;
wenzelm
parents:
66379
diff
changeset
|
655 |
val theory_timing = (functionN, "theory_timing"); |
9953ae603a23
provide theory timing information, similar to command timing but always considered relevant;
wenzelm
parents:
66379
diff
changeset
|
656 |
|
68088 | 657 |
val exportN = "export"; |
68101 | 658 |
type export_args = |
659 |
{id: string option, serial: serial, theory_name: string, name: string, compress: bool} |
|
660 |
fun export ({id, serial, theory_name, name, compress}: export_args) = |
|
661 |
[(functionN, exportN), (idN, the_default "" id), (serialN, Value.print_int serial), |
|
68090 | 662 |
("theory_name", theory_name), (nameN, name), ("compress", Value.print_bool compress)]; |
68088 | 663 |
|
50845 | 664 |
fun loading_theory name = [("function", "loading_theory"), ("name", name)]; |
665 |
||
666 |
fun dest_loading_theory [("function", "loading_theory"), ("name", name)] = SOME name |
|
667 |
| dest_loading_theory _ = NONE; |
|
668 |
||
65313 | 669 |
val build_session_finished = [("function", "build_session_finished")]; |
56616
abc2da18d08d
added protocol command "use_theories", with core functionality of batch build;
wenzelm
parents:
56548
diff
changeset
|
670 |
|
56864 | 671 |
val print_operationsN = "print_operations"; |
672 |
val print_operations = [(functionN, print_operationsN)]; |
|
673 |
||
50201
c26369c9eda6
Isabelle-specific implementation of quasi-abstract markup elements -- back to module arrangement before d83797ef0d2d;
wenzelm
parents:
46894
diff
changeset
|
674 |
|
60830 | 675 |
(* debugger *) |
676 |
||
60842 | 677 |
fun debugger_state name = [(functionN, "debugger_state"), (nameN, name)]; |
60834 | 678 |
fun debugger_output name = [(functionN, "debugger_output"), (nameN, name)]; |
60830 | 679 |
|
680 |
||
55553
99409ccbe04a
more standard names for protocol and markup elements;
wenzelm
parents:
55551
diff
changeset
|
681 |
(* simplifier trace *) |
99409ccbe04a
more standard names for protocol and markup elements;
wenzelm
parents:
55551
diff
changeset
|
682 |
|
57594
037f3b251df5
regular message to refer to Simplifier Trace panel (unused);
wenzelm
parents:
56864
diff
changeset
|
683 |
val simp_trace_panelN = "simp_trace_panel"; |
037f3b251df5
regular message to refer to Simplifier Trace panel (unused);
wenzelm
parents:
56864
diff
changeset
|
684 |
|
55553
99409ccbe04a
more standard names for protocol and markup elements;
wenzelm
parents:
55551
diff
changeset
|
685 |
val simp_trace_logN = "simp_trace_log"; |
99409ccbe04a
more standard names for protocol and markup elements;
wenzelm
parents:
55551
diff
changeset
|
686 |
val simp_trace_stepN = "simp_trace_step"; |
99409ccbe04a
more standard names for protocol and markup elements;
wenzelm
parents:
55551
diff
changeset
|
687 |
val simp_trace_recurseN = "simp_trace_recurse"; |
99409ccbe04a
more standard names for protocol and markup elements;
wenzelm
parents:
55551
diff
changeset
|
688 |
val simp_trace_hintN = "simp_trace_hint"; |
99409ccbe04a
more standard names for protocol and markup elements;
wenzelm
parents:
55551
diff
changeset
|
689 |
val simp_trace_ignoreN = "simp_trace_ignore"; |
99409ccbe04a
more standard names for protocol and markup elements;
wenzelm
parents:
55551
diff
changeset
|
690 |
|
63806 | 691 |
fun simp_trace_cancel i = [(functionN, "simp_trace_cancel"), (serialN, Value.print_int i)]; |
55553
99409ccbe04a
more standard names for protocol and markup elements;
wenzelm
parents:
55551
diff
changeset
|
692 |
|
27969 | 693 |
|
55672
5e25cc741ab9
support for completion within the formal context;
wenzelm
parents:
55666
diff
changeset
|
694 |
|
30221 | 695 |
(** print mode operations **) |
23704 | 696 |
|
29325 | 697 |
val no_output = ("", ""); |
23704 | 698 |
|
699 |
local |
|
62933
f14569a9ab93
proper output of markup, e.g. relevant for nested ML as used in Pure/System/bash.ML;
wenzelm
parents:
62806
diff
changeset
|
700 |
val default = {output = Output_Primitives.markup_fn}; |
43684 | 701 |
val modes = Synchronized.var "Markup.modes" (Symtab.make [("", default)]); |
23704 | 702 |
in |
43684 | 703 |
fun add_mode name output = |
46894
e2ad717ec889
allow redefining pretty/markup modes (not output due to bootstrap issues) -- to support reloading of theory src/HOL/src/Tools/Code_Generator;
wenzelm
parents:
45674
diff
changeset
|
704 |
Synchronized.change modes (fn tab => |
e2ad717ec889
allow redefining pretty/markup modes (not output due to bootstrap issues) -- to support reloading of theory src/HOL/src/Tools/Code_Generator;
wenzelm
parents:
45674
diff
changeset
|
705 |
(if not (Symtab.defined tab name) then () |
61209 | 706 |
else Output.warning ("Redefining markup mode " ^ quote name); |
46894
e2ad717ec889
allow redefining pretty/markup modes (not output due to bootstrap issues) -- to support reloading of theory src/HOL/src/Tools/Code_Generator;
wenzelm
parents:
45674
diff
changeset
|
707 |
Symtab.update (name, {output = output}) tab)); |
23704 | 708 |
fun get_mode () = |
43684 | 709 |
the_default default |
710 |
(Library.get_first (Symtab.lookup (Synchronized.value modes)) (print_mode_value ())); |
|
23623 | 711 |
end; |
23704 | 712 |
|
38474
e498dc2eb576
uniform Markup.empty/Markup.Empty in ML and Scala;
wenzelm
parents:
38429
diff
changeset
|
713 |
fun output m = if is_empty m then no_output else #output (get_mode ()) m; |
23704 | 714 |
|
23719 | 715 |
val enclose = output #-> Library.enclose; |
716 |
||
25552 | 717 |
fun markup m = |
718 |
let val (bg, en) = output m |
|
719 |
in Library.enclose (Output.escape bg) (Output.escape en) end; |
|
720 |
||
59125 | 721 |
val markups = fold_rev markup; |
722 |
||
43665 | 723 |
fun markup_only m = markup m ""; |
724 |
||
55956
94d384d621b0
reject internal term names outright, and complete consts instead;
wenzelm
parents:
55919
diff
changeset
|
725 |
fun markup_report "" = "" |
94d384d621b0
reject internal term names outright, and complete consts instead;
wenzelm
parents:
55919
diff
changeset
|
726 |
| markup_report txt = markup report txt; |
94d384d621b0
reject internal term names outright, and complete consts instead;
wenzelm
parents:
55919
diff
changeset
|
727 |
|
23704 | 728 |
end; |