# HG changeset patch # User wenzelm # Date 1726868193 -7200 # Node ID 01b8c8d17f1362a7b8c71ddc44d924cca13674ad # Parent dbaa780c6d0d9f24325b0dfef3a1480ae62940d1 more inner syntax markup: Pure; diff -r dbaa780c6d0d -r 01b8c8d17f13 src/Pure/pure_thy.ML --- a/src/Pure/pure_thy.ML Fri Sep 20 21:34:09 2024 +0200 +++ b/src/Pure/pure_thy.ML Fri Sep 20 23:36:33 2024 +0200 @@ -33,14 +33,18 @@ (* application syntax variants *) val appl_syntax = - [("_appl", typ "('b \ 'a) \ args \ logic", mixfix ("(1_/(1'(_')))", [1000, 0], 1000)), - ("_appl", typ "('b \ 'a) \ args \ aprop", mixfix ("(1_/(1'(_')))", [1000, 0], 1000))]; + [("_appl", typ "('b \ 'a) \ args \ logic", + mixfix ("(\indent=1 expression=term_application\_/(1'(_')))", [1000, 0], 1000)), + ("_appl", typ "('b \ 'a) \ args \ aprop", + mixfix ("(\indent=1 expression=term_application\_/(1'(_')))", [1000, 0], 1000))]; val applC_syntax = [("", typ "'a \ cargs", Mixfix.mixfix "_"), ("_cargs", typ "'a \ cargs \ cargs", mixfix ("_/ _", [1000, 1000], 1000)), - ("_applC", typ "('b \ 'a) \ cargs \ logic", mixfix ("(1_/ _)", [1000, 1000], 999)), - ("_applC", typ "('b \ 'a) \ cargs \ aprop", mixfix ("(1_/ _)", [1000, 1000], 999))]; + ("_applC", typ "('b \ 'a) \ cargs \ logic", + mixfix ("(\indent=1 expression=term_application\_/ _)", [1000, 1000], 999)), + ("_applC", typ "('b \ 'a) \ cargs \ aprop", + mixfix ("(\indent=1 expression=term_application\_/ _)", [1000, 1000], 999))]; structure Old_Appl_Syntax = Theory_Data ( @@ -114,15 +118,19 @@ ("", typ "class_name \ classes", Mixfix.mixfix "_"), ("_classes", typ "class_name \ classes \ classes", Mixfix.mixfix "_,_"), ("_tapp", typ "type \ type_name \ type", mixfix ("_ _", [1000, 0], 1000)), - ("_tappl", typ "type \ types \ type_name \ type", Mixfix.mixfix "((1'(_,/ _')) _)"), + ("_tappl", typ "type \ types \ type_name \ type", + Mixfix.mixfix "(\expression=type_application\(1'(_,/ _')) _)"), ("", typ "type \ types", Mixfix.mixfix "_"), ("_types", typ "type \ types \ types", Mixfix.mixfix "_,/ _"), - ("\<^type>fun", typ "type \ type \ type", mixfix ("(_/ \ _)", [1, 0], 0)), - ("_bracket", typ "types \ type \ type", mixfix ("([_]/ \ _)", [0, 0], 0)), + ("\<^type>fun", typ "type \ type \ type", + mixfix ("(\notation=\infix \\\_/ \ _)", [1, 0], 0)), + ("_bracket", typ "types \ type \ type", + mixfix ("(\notation=\infix \\\[_]/ \ _)", [0, 0], 0)), ("", typ "type \ type", Mixfix.mixfix "'(_')"), ("\<^type>dummy", typ "type", Mixfix.mixfix "'_"), ("_type_prop", typ "'a", NoSyn), - ("_lambda", typ "pttrns \ 'a \ logic", mixfix ("(3\_./ _)", [0, 3], 3)), + ("_lambda", typ "pttrns \ 'a \ logic", + mixfix ("(\indent=3 expression=term_abstraction\\_./ _)", [0, 3], 3)), ("_abs", typ "'a", NoSyn), ("", typ "'a \ args", Mixfix.mixfix "_"), ("_args", typ "'a \ args \ args", Mixfix.mixfix "_,/ _"), @@ -144,7 +152,8 @@ ("_aprop", typ "aprop \ prop", Mixfix.mixfix "PROP _"), ("_asm", typ "prop \ asms", Mixfix.mixfix "_"), ("_asms", typ "prop \ asms \ asms", Mixfix.mixfix "_;/ _"), - ("_bigimpl", typ "asms \ prop \ prop", mixfix ("((1\_\)/ \ _)", [0, 1], 1)), + ("_bigimpl", typ "asms \ prop \ prop", + mixfix ("(\notation=\infix \\\(1\_\)/ \ _)", [0, 1], 1)), ("_ofclass", typ "type \ logic \ prop", Mixfix.mixfix "(1OFCLASS/(1'(_,/ _')))"), ("_mk_ofclass", typ "dummy", NoSyn), ("_TYPE", typ "type \ logic", Mixfix.mixfix "(1TYPE/(1'(_')))"), @@ -186,14 +195,19 @@ (const "Pure.conjunction", typ "prop \ prop \ prop", infixr_ ("&&&", 2))] #> Sign.syntax_global true Syntax.mode_default applC_syntax #> Sign.syntax_global true (Print_Mode.ASCII, true) - [(tycon "fun", typ "type \ type \ type", mixfix ("(_/ => _)", [1, 0], 0)), - ("_bracket", typ "types \ type \ type", mixfix ("([_]/ => _)", [0, 0], 0)), - ("_lambda", typ "pttrns \ 'a \ logic", mixfix ("(3%_./ _)", [0, 3], 3)), + [(tycon "fun", typ "type \ type \ type", + mixfix ("(\notation=\infix =>\\_/ => _)", [1, 0], 0)), + ("_bracket", typ "types \ type \ type", + mixfix ("(\notation=\infix =>\\[_]/ => _)", [0, 0], 0)), + ("_lambda", typ "pttrns \ 'a \ logic", + mixfix ("(\indent=3 expression=term_abstraction\%_./ _)", [0, 3], 3)), (const "Pure.eq", typ "'a \ 'a \ prop", infix_ ("==", 2)), - (const "Pure.all_binder", typ "idts \ prop \ prop", mixfix ("(3!!_./ _)", [0, 0], 0)), + (const "Pure.all_binder", typ "idts \ prop \ prop", + mixfix ("(\indent=3 notation=\binder !!\\!!_./ _)", [0, 0], 0)), (const "Pure.imp", typ "prop \ prop \ prop", infixr_ ("==>", 1)), ("_DDDOT", typ "aprop", Mixfix.mixfix "..."), - ("_bigimpl", typ "asms \ prop \ prop", mixfix ("((3[| _ |])/ ==> _)", [0, 1], 1)), + ("_bigimpl", typ "asms \ prop \ prop", + mixfix ("(\notation=\infix \\\(3[| _ |])/ ==> _)", [0, 1], 1)), ("_DDDOT", typ "logic", Mixfix.mixfix "...")] #> Sign.syntax_global true ("", false) [(const "Pure.prop", typ "prop \ prop", mixfix ("_", [0], 0))]