src/Pure/ML/ml_thms.ML
changeset 58045 ab2483fad861
parent 58033 154ae20ead35
child 58866 f81e11391562
equal deleted inserted replaced
58037:f7be22c6646b 58045:ab2483fad861
    42 val _ = Theory.setup
    42 val _ = Theory.setup
    43   (ML_Antiquotation.declaration @{binding attributes} (Scan.lift Parse.attribs)
    43   (ML_Antiquotation.declaration @{binding attributes} (Scan.lift Parse.attribs)
    44     (fn _ => fn raw_srcs => fn ctxt =>
    44     (fn _ => fn raw_srcs => fn ctxt =>
    45       let
    45       let
    46         val i = serial ();
    46         val i = serial ();
    47         val srcs = map (Attrib.check_src ctxt) raw_srcs;
    47 
    48         val _ = map (Attrib.attribute ctxt) srcs;
       
    49         val (a, ctxt') = ctxt
    48         val (a, ctxt') = ctxt
    50           |> ML_Antiquotation.variant "attributes" ||> put_attributes (i, srcs);
    49           |> ML_Antiquotation.variant "attributes"
       
    50           ||> put_attributes (i, Attrib.check_attribs ctxt raw_srcs);
    51         val ml =
    51         val ml =
    52           ("val " ^ a ^ " = ML_Thms.the_attributes ML_context " ^
    52           ("val " ^ a ^ " = ML_Thms.the_attributes ML_context " ^
    53             string_of_int i ^ ";\n", "Isabelle." ^ a);
    53             string_of_int i ^ ";\n", "Isabelle." ^ a);
    54       in (K ml, ctxt') end));
    54       in (K ml, ctxt') end));
    55 
    55