equal
deleted
inserted
replaced
375 (* classes *) |
375 (* classes *) |
376 |
376 |
377 fun read_class ctxt text = |
377 fun read_class ctxt text = |
378 let |
378 let |
379 val tsig = tsig_of ctxt; |
379 val tsig = tsig_of ctxt; |
380 val (s, pos) = Symbol_Pos.source_content (Syntax.read_token text); |
380 val class_space = Type.class_space tsig; |
381 val c = Type.cert_class tsig (Type.intern_class tsig s) |
381 |
382 handle TYPE (msg, _, _) => error (msg ^ Position.here pos); |
382 val (xname, pos) = Symbol_Pos.source_content (Syntax.read_token text); |
383 val _ = Context_Position.report ctxt pos (Name_Space.markup (Type.class_space tsig) c); |
383 val name = Type.cert_class tsig (Type.intern_class tsig xname) |
384 in c end; |
384 handle TYPE (msg, _, _) => |
|
385 (Completion.report (Name_Space.completion (Context.Proof ctxt) class_space (xname, pos)); |
|
386 error (msg ^ Position.here pos)); |
|
387 val _ = Context_Position.report ctxt pos (Name_Space.markup class_space name); |
|
388 in name end; |
385 |
389 |
386 |
390 |
387 (* types *) |
391 (* types *) |
388 |
392 |
389 fun read_typ_mode mode ctxt s = |
393 fun read_typ_mode mode ctxt s = |