forked from Isabelle_DOF/Isabelle_DOF
Disable invariants checking for declare_reference* without meta args
This commit is contained in:
parent
37afd975b3
commit
dde865520a
|
@ -1780,7 +1780,12 @@ fun create_and_check_docitem is_monitor {is_inline=is_inline} {define=define} oi
|
||||||
|> value (Proof_Context.init_global thy),
|
|> value (Proof_Context.init_global thy),
|
||||||
is_inline, cid_long, vcid))
|
is_inline, cid_long, vcid))
|
||||||
|> register_oid_cid_in_open_monitors oid pos cid_pos'
|
|> register_oid_cid_in_open_monitors oid pos cid_pos'
|
||||||
|> tap (DOF_core.check_opening_ml_invs cid_long oid is_monitor)
|
|> (fn thy =>
|
||||||
|
if (* declare_reference* without arguments is not checked against invariants *)
|
||||||
|
thy |> DOF_core.get_defined_global oid |> not
|
||||||
|
andalso null doc_attrs
|
||||||
|
then thy
|
||||||
|
else thy |> tap (DOF_core.check_opening_ml_invs cid_long oid is_monitor)
|
||||||
|> tap (DOF_core.check_ml_invs cid_long oid is_monitor)
|
|> tap (DOF_core.check_ml_invs cid_long oid is_monitor)
|
||||||
(* Bypass checking of high-level invariants when the class default_cid = "text",
|
(* Bypass checking of high-level invariants when the class default_cid = "text",
|
||||||
the top (default) document class.
|
the top (default) document class.
|
||||||
|
@ -1792,7 +1797,7 @@ fun create_and_check_docitem is_monitor {is_inline=is_inline} {define=define} oi
|
||||||
ex: text*[sdf]\<open> Lorem ipsum @{thm refl}\<close> *)
|
ex: text*[sdf]\<open> Lorem ipsum @{thm refl}\<close> *)
|
||||||
|> (fn thy => if default_cid then thy
|
|> (fn thy => if default_cid then thy
|
||||||
else if Config.get_global thy DOF_core.invariants_checking
|
else if Config.get_global thy DOF_core.invariants_checking
|
||||||
then check_invariants thy (oid, pos) else thy)
|
then check_invariants thy (oid, pos) else thy))
|
||||||
end
|
end
|
||||||
|
|
||||||
end (* structure Docitem_Parser *)
|
end (* structure Docitem_Parser *)
|
||||||
|
|
Loading…
Reference in New Issue