read_class: perform actual read, with source position;
authorwenzelm
Sat, 27 Feb 2010 13:32:18 +0100
changeset 35395 ba804f4c82c6
parent 35394 11f58c600707
child 35396 041bb8d18916
read_class: perform actual read, with source position;
src/Pure/sign.ML
--- a/src/Pure/sign.ML	Sat Feb 27 13:32:05 2010 +0100
+++ b/src/Pure/sign.ML	Sat Feb 27 13:32:18 2010 +0100
@@ -404,8 +404,13 @@
 
 (* classes *)
 
-fun read_class thy c = certify_class thy (intern_class thy c)
-  handle TYPE (msg, _, _) => error msg;
+fun read_class thy text =
+  let
+    val (syms, pos) = Syntax.read_token text;
+    val c = certify_class thy (intern_class thy (Symbol_Pos.content syms))
+      handle TYPE (msg, _, _) => error (msg ^ Position.str_of pos);
+    val _ = Position.report (Markup.tclass c) pos;
+  in c end;
 
 
 (* type arities *)