src/Pure/Thy/thy_output.ML
changeset 59067 dd8ec9138112
parent 59066 45ab32a542fe
child 59175 bf465f335e85
equal deleted inserted replaced
59066:45ab32a542fe 59067:dd8ec9138112
   669   (fn {context = ctxt, ...} => fn source =>
   669   (fn {context = ctxt, ...} => fn source =>
   670    (ML_Context.eval_in (SOME ctxt) ML_Compiler.flags (Input.pos_of source) (ml source);
   670    (ML_Context.eval_in (SOME ctxt) ML_Compiler.flags (Input.pos_of source) (ml source);
   671     verbatim_text ctxt (Input.source_content source)));
   671     verbatim_text ctxt (Input.source_content source)));
   672 
   672 
   673 fun ml_enclose bg en source =
   673 fun ml_enclose bg en source =
   674   ML_Lex.read Position.none bg @
   674   ML_Lex.read bg @ ML_Lex.read_source false source @ ML_Lex.read en;
   675   ML_Lex.read_source false source @
       
   676   ML_Lex.read Position.none en;
       
   677 
   675 
   678 in
   676 in
   679 
   677 
   680 val _ = Theory.setup
   678 val _ = Theory.setup
   681  (ml_text @{binding ML} (ml_enclose "fn _ => (" ");") #>
   679  (ml_text @{binding ML} (ml_enclose "fn _ => (" ");") #>
   684   ml_text @{binding ML_structure}
   682   ml_text @{binding ML_structure}
   685     (ml_enclose "functor XXX() = struct structure XX = " " end;") #>
   683     (ml_enclose "functor XXX() = struct structure XX = " " end;") #>
   686 
   684 
   687   ml_text @{binding ML_functor}   (* FIXME formal treatment of functor name (!?) *)
   685   ml_text @{binding ML_functor}   (* FIXME formal treatment of functor name (!?) *)
   688     (fn source =>
   686     (fn source =>
   689       ML_Lex.read Position.none ("ML_Env.check_functor " ^
   687       ML_Lex.read ("ML_Env.check_functor " ^
   690         ML_Syntax.print_string (Input.source_content source))) #>
   688         ML_Syntax.print_string (Input.source_content source))) #>
   691 
   689 
   692   ml_text @{binding ML_text} (K []));
   690   ml_text @{binding ML_text} (K []));
   693 
   691 
   694 end;
   692 end;