src/Pure/Isar/isar_output.ML
changeset 22086 cf6019fece63
parent 21879 a3efbae45735
equal deleted inserted replaced
22085:c138cfd500f7 22086:cf6019fece63
   507 fun ml_val txt = "fn _ => (" ^ txt ^ ");";
   507 fun ml_val txt = "fn _ => (" ^ txt ^ ");";
   508 fun ml_type txt = "val _ = NONE : (" ^ txt ^ ") option;";
   508 fun ml_type txt = "val _ = NONE : (" ^ txt ^ ") option;";
   509 fun ml_struct txt = "functor DUMMY_FUNCTOR() = struct structure DUMMY = " ^ txt ^ " end;"
   509 fun ml_struct txt = "functor DUMMY_FUNCTOR() = struct structure DUMMY = " ^ txt ^ " end;"
   510 
   510 
   511 fun output_ml ml src ctxt txt =
   511 fun output_ml ml src ctxt txt =
   512  (Context.use_mltext (ml txt) false (SOME (ProofContext.theory_of ctxt));
   512  (Context.use_mltext (ml txt) false (SOME (Context.Proof ctxt));
   513   (if ! source then str_of_source src else txt)
   513   (if ! source then str_of_source src else txt)
   514   |> (if ! quotes then quote else I)
   514   |> (if ! quotes then quote else I)
   515   |> (if ! display then enclose "\\begin{verbatim}\n" "\n\\end{verbatim}"
   515   |> (if ! display then enclose "\\begin{verbatim}\n" "\n\\end{verbatim}"
   516   else
   516   else
   517     split_lines
   517     split_lines