src/Pure/Isar/attrib.ML
changeset 17412 e26cb20ef0cc
parent 17221 6cd180204582
child 17496 26535df536ae
equal deleted inserted replaced
17411:664434175578 17412:e26cb20ef0cc
   102 fun gen_attribute which thy =
   102 fun gen_attribute which thy =
   103   let
   103   let
   104     val attrs = #2 (AttributesData.get thy);
   104     val attrs = #2 (AttributesData.get thy);
   105     fun attr src =
   105     fun attr src =
   106       let val ((name, _), pos) = Args.dest_src src in
   106       let val ((name, _), pos) = Args.dest_src src in
   107         (case Symtab.curried_lookup attrs name of
   107         (case Symtab.lookup attrs name of
   108           NONE => error ("Unknown attribute: " ^ quote name ^ Position.str_of pos)
   108           NONE => error ("Unknown attribute: " ^ quote name ^ Position.str_of pos)
   109         | SOME ((p, _), _) => transform_failure (curry ATTRIB_FAIL (name, pos)) (which p src))
   109         | SOME ((p, _), _) => transform_failure (curry ATTRIB_FAIL (name, pos)) (which p src))
   110       end;
   110       end;
   111   in attr end;
   111   in attr end;
   112 
   112