src/Pure/Isar/attrib.ML
changeset 23086 12320f6e2523
parent 22900 f8a7c10e1bd0
child 23577 c5b93c69afd3
equal deleted inserted replaced
23085:fd30d75a6614 23086:12320f6e2523
   125 
   125 
   126 fun add_attributes raw_attrs thy =
   126 fun add_attributes raw_attrs thy =
   127   let
   127   let
   128     val new_attrs =
   128     val new_attrs =
   129       raw_attrs |> map (fn (name, att, comment) => (name, ((att, comment), stamp ())));
   129       raw_attrs |> map (fn (name, att, comment) => (name, ((att, comment), stamp ())));
   130     fun add attrs = NameSpace.extend_table (Sign.naming_of thy) (attrs, new_attrs)
   130     fun add attrs = NameSpace.extend_table (Sign.naming_of thy) new_attrs attrs
   131       handle Symtab.DUPS dups =>
   131       handle Symtab.DUPS dups =>
   132         error ("Duplicate declaration of attributes(s) " ^ commas_quote dups);
   132         error ("Duplicate declaration of attributes(s) " ^ commas_quote dups);
   133   in AttributesData.map add thy end;
   133   in AttributesData.map add thy end;
   134 
   134 
   135 
   135