equal
deleted
inserted
replaced
134 fun pretty_axclass (name, {super_classes, intro, axioms}) = Pretty.block (Pretty.fbreaks |
134 fun pretty_axclass (name, {super_classes, intro, axioms}) = Pretty.block (Pretty.fbreaks |
135 [pretty_class name super_classes, pretty_thms introN [intro], pretty_thms axiomsN axioms]); |
135 [pretty_class name super_classes, pretty_thms introN [intro], pretty_thms axiomsN axioms]); |
136 in Pretty.writeln (Pretty.chunks (map pretty_axclass (Symtab.dest tab))) end; |
136 in Pretty.writeln (Pretty.chunks (map pretty_axclass (Symtab.dest tab))) end; |
137 end); |
137 end); |
138 |
138 |
139 val _ = Context.add_setup [AxclassesData.init]; |
139 val _ = Context.add_setup AxclassesData.init; |
140 val print_axclasses = AxclassesData.print; |
140 val print_axclasses = AxclassesData.print; |
141 |
141 |
142 |
142 |
143 val lookup_info = Symtab.lookup o AxclassesData.get; |
143 val lookup_info = Symtab.lookup o AxclassesData.get; |
144 |
144 |
332 |
332 |
333 fun default_tac rules ctxt facts = |
333 fun default_tac rules ctxt facts = |
334 HEADGOAL (Method.some_rule_tac rules ctxt facts) ORELSE |
334 HEADGOAL (Method.some_rule_tac rules ctxt facts) ORELSE |
335 default_intro_classes_tac facts; |
335 default_intro_classes_tac facts; |
336 |
336 |
337 val _ = Context.add_setup [Method.add_methods |
337 val _ = Context.add_setup (Method.add_methods |
338 [("intro_classes", Method.no_args (Method.METHOD intro_classes_tac), |
338 [("intro_classes", Method.no_args (Method.METHOD intro_classes_tac), |
339 "back-chain introduction rules of axiomatic type classes"), |
339 "back-chain introduction rules of axiomatic type classes"), |
340 ("default", Method.thms_ctxt_args (Method.METHOD oo default_tac), "apply some intro/elim rule")]]; |
340 ("default", Method.thms_ctxt_args (Method.METHOD oo default_tac), "apply some intro/elim rule")]); |
341 |
341 |
342 |
342 |
343 |
343 |
344 (** outer syntax **) |
344 (** outer syntax **) |
345 |
345 |