equal
deleted
inserted
replaced
1095 Toplevel.keep (Pretty.writeln o Pretty.chunks o Isar_Cmd.pretty_theorems b))); |
1095 Toplevel.keep (Pretty.writeln o Pretty.chunks o Isar_Cmd.pretty_theorems b))); |
1096 |
1096 |
1097 val _ = |
1097 val _ = |
1098 Outer_Syntax.command \<^command_keyword>\<open>print_locales\<close> |
1098 Outer_Syntax.command \<^command_keyword>\<open>print_locales\<close> |
1099 "print locales of this theory" |
1099 "print locales of this theory" |
1100 (Parse.opt_bang >> (fn b => |
1100 (Parse.opt_bang >> (fn verbose => |
1101 Toplevel.keep (Locale.print_locales b o Toplevel.theory_of))); |
1101 Toplevel.keep (fn state => |
|
1102 let val thy = Toplevel.theory_of state |
|
1103 in Pretty.writeln (Locale.pretty_locales thy verbose) end))); |
1102 |
1104 |
1103 val _ = |
1105 val _ = |
1104 Outer_Syntax.command \<^command_keyword>\<open>print_classes\<close> |
1106 Outer_Syntax.command \<^command_keyword>\<open>print_classes\<close> |
1105 "print classes of this theory" |
1107 "print classes of this theory" |
1106 (Scan.succeed (Toplevel.keep (Class.print_classes o Toplevel.context_of))); |
1108 (Scan.succeed (Toplevel.keep (Class.print_classes o Toplevel.context_of))); |
1116 in Pretty.writeln (Locale.pretty_locale thy show_facts name) end))); |
1118 in Pretty.writeln (Locale.pretty_locale thy show_facts name) end))); |
1117 |
1119 |
1118 val _ = |
1120 val _ = |
1119 Outer_Syntax.command \<^command_keyword>\<open>print_interps\<close> |
1121 Outer_Syntax.command \<^command_keyword>\<open>print_interps\<close> |
1120 "print interpretations of locale for this theory or proof context" |
1122 "print interpretations of locale for this theory or proof context" |
1121 (Parse.position Parse.name >> (fn name => |
1123 (Parse.position Parse.name >> (fn raw_name => |
1122 Toplevel.keep (fn state => Locale.print_registrations (Toplevel.context_of state) name))); |
1124 Toplevel.keep (fn state => |
|
1125 let |
|
1126 val ctxt = Toplevel.context_of state; |
|
1127 val thy = Toplevel.theory_of state; |
|
1128 val name = Locale.check thy raw_name; |
|
1129 in Pretty.writeln (Locale.pretty_registrations ctxt name) end))); |
1123 |
1130 |
1124 val _ = |
1131 val _ = |
1125 Outer_Syntax.command \<^command_keyword>\<open>print_dependencies\<close> |
1132 Outer_Syntax.command \<^command_keyword>\<open>print_dependencies\<close> |
1126 "print dependencies of locale expression" |
1133 "print dependencies of locale expression" |
1127 (Parse.opt_bang -- Parse_Spec.locale_expression >> (fn (clean, expr) => |
1134 (Parse.opt_bang -- Parse_Spec.locale_expression >> (fn (clean, expr) => |