You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Because notations, hidden implicit arguments, hidden coercions or hidden
1173
+
universe instances can make different terms print alike, the printed form
1174
+
of a term cannot always be parsed and elaborated back to the term it
1175
+
stands for. Rather than unconditionally making printing fully explicit as
1176
+
:flag:`Printing All` does, the following flags keep the current printing
1177
+
options, but check, each time a term is printed, that its printed form
1178
+
can be parsed and elaborated back to a term equal to the original one, up
1179
+
to the equivalence selected by the flag; when the check fails, printing
1180
+
options are progressively turned on — first :flag:`Printing Coercions`,
1181
+
then :flag:`Printing Implicit`, then unsetting :flag:`Printing Notations`,
1182
+
then :flag:`Printing Universes` (first with, then without notations),
1183
+
then :flag:`Printing Parentheses` and finally all the options implied by
1184
+
:flag:`Printing All` — until the printed form passes the check.
1185
+
1186
+
These five flags are mutually exclusive: setting one of them unsets the
1187
+
others, and unsetting the currently set one turns the checks off
1188
+
entirely. All are off by default. Since every displayed term is re-parsed
1189
+
and re-elaborated (possibly several times), printing can become
1190
+
noticeably more expensive when one of these flags is set.
1191
+
1192
+
.. flag:: Printing Reversible Up To Unification
1193
+
1194
+
The re-parsed form must unify with the original term: holes standing
1195
+
for arguments that are not printed and universes introduced by the
1196
+
re-elaboration may be instantiated by unifying against the original
1197
+
term. This is the most permissive of the five checks; it accepts any
1198
+
printed form that can denote the original term, even if only in a
1199
+
context where the expected type is known.
1200
+
1201
+
.. warn:: The printed form of this term could not be re-parsed and re-elaborated to an equal term (up to ...), even with all printing options turned on.
1202
+
1203
+
If no printed form, however explicit, passes the check, the most
1204
+
explicit one is printed anyway and this warning is emitted. This
1205
+
happens for instance for terms mentioning universes that cannot be
1206
+
referred to by name, such as the sort of ``Check Type``.
1207
+
1208
+
.. flag:: Printing Reversible Up To Conversion Modulo Sorts And Universes
1209
+
1210
+
The printed form must re-elaborate on its own (without help from the
1211
+
original term) to a term with no unresolved holes, and that term must
1212
+
be convertible to the original one when sorts and universes are
0 commit comments