src/Pure/Isar/isar_cmd.ML
changeset 37146 f652333bbf8e
parent 36950 75b8f26f2f07
child 37198 3af985b10550
equal deleted inserted replaced
37145:01aa36932739 37146:f652333bbf8e
   279 fun set_limit _ NONE = ()
   279 fun set_limit _ NONE = ()
   280   | set_limit r (SOME n) = r := n;
   280   | set_limit r (SOME n) = r := n;
   281 
   281 
   282 fun pr (modes, (lim1, lim2)) = Toplevel.keep (fn state =>
   282 fun pr (modes, (lim1, lim2)) = Toplevel.keep (fn state =>
   283   (set_limit goals_limit lim1; set_limit ProofContext.prems_limit lim2; Toplevel.quiet := false;
   283   (set_limit goals_limit lim1; set_limit ProofContext.prems_limit lim2; Toplevel.quiet := false;
   284     PrintMode.with_modes modes (Toplevel.print_state true) state));
   284     Print_Mode.with_modes modes (Toplevel.print_state true) state));
   285 
   285 
   286 val disable_pr = Toplevel.imperative (fn () => Toplevel.quiet := true);
   286 val disable_pr = Toplevel.imperative (fn () => Toplevel.quiet := true);
   287 val enable_pr = Toplevel.imperative (fn () => Toplevel.quiet := false);
   287 val enable_pr = Toplevel.imperative (fn () => Toplevel.quiet := false);
   288 
   288 
   289 
   289 
   486     val ctxt = Proof.context_of state;
   486     val ctxt = Proof.context_of state;
   487     val T = Syntax.read_typ ctxt s;
   487     val T = Syntax.read_typ ctxt s;
   488   in Pretty.string_of (Pretty.quote (Syntax.pretty_typ ctxt T)) end;
   488   in Pretty.string_of (Pretty.quote (Syntax.pretty_typ ctxt T)) end;
   489 
   489 
   490 fun print_item string_of (modes, arg) = Toplevel.keep (fn state =>
   490 fun print_item string_of (modes, arg) = Toplevel.keep (fn state =>
   491   PrintMode.with_modes modes (fn () =>
   491   Print_Mode.with_modes modes (fn () =>
   492     writeln (string_of (Toplevel.enter_proof_body state) arg)) ());
   492     writeln (string_of (Toplevel.enter_proof_body state) arg)) ());
   493 
   493 
   494 in
   494 in
   495 
   495 
   496 val print_stmts = print_item string_of_stmts;
   496 val print_stmts = print_item string_of_stmts;