equal
deleted
inserted
replaced
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 |