# HG changeset patch # User wenzelm # Date 1302289400 -7200 # Node ID dcc08f2a86711877206c33c924193ede8d62b6af # Parent 8fdbb3b10bebc5c80d7fe94c3ed948d06ef3a5ff CONST syntax with positions; diff -r 8fdbb3b10beb -r dcc08f2a8671 src/Pure/Syntax/syntax_phases.ML --- a/src/Pure/Syntax/syntax_phases.ML Fri Apr 08 20:39:09 2011 +0200 +++ b/src/Pure/Syntax/syntax_phases.ML Fri Apr 08 21:03:20 2011 +0200 @@ -667,6 +667,8 @@ val Const (c', _) = ProofContext.read_const_proper ctxt false c; val d = if intern then Lexicon.mark_const c' else c; in Ast.Constant d end + | const_ast_tr intern ctxt [Ast.Appl [Ast.Constant "_constrain", x, T]] = + Ast.Appl [Ast.Constant "_constrain", const_ast_tr intern ctxt [x], T] | const_ast_tr _ _ asts = raise Ast.AST ("const_ast_tr", asts); diff -r 8fdbb3b10beb -r dcc08f2a8671 src/Pure/pure_thy.ML --- a/src/Pure/pure_thy.ML Fri Apr 08 20:39:09 2011 +0200 +++ b/src/Pure/pure_thy.ML Fri Apr 08 21:03:20 2011 +0200 @@ -137,14 +137,14 @@ ("_constrain_position", typ "id => id_position", Delimfix "_"), ("_constrain_position", typ "longid => longid_position", Delimfix "_"), ("_type_constraint_", typ "'a", NoSyn), - ("_context_const", typ "id => logic", Delimfix "CONST _"), - ("_context_const", typ "id => aprop", Delimfix "CONST _"), - ("_context_const", typ "longid => logic", Delimfix "CONST _"), - ("_context_const", typ "longid => aprop", Delimfix "CONST _"), - ("_context_xconst", typ "id => logic", Delimfix "XCONST _"), - ("_context_xconst", typ "id => aprop", Delimfix "XCONST _"), - ("_context_xconst", typ "longid => logic", Delimfix "XCONST _"), - ("_context_xconst", typ "longid => aprop", Delimfix "XCONST _"), + ("_context_const", typ "id_position => logic", Delimfix "CONST _"), + ("_context_const", typ "id_position => aprop", Delimfix "CONST _"), + ("_context_const", typ "longid_position => logic", Delimfix "CONST _"), + ("_context_const", typ "longid_position => aprop", Delimfix "CONST _"), + ("_context_xconst", typ "id_position => logic", Delimfix "XCONST _"), + ("_context_xconst", typ "id_position => aprop", Delimfix "XCONST _"), + ("_context_xconst", typ "longid_position => logic", Delimfix "XCONST _"), + ("_context_xconst", typ "longid_position => aprop", Delimfix "XCONST _"), (const "==>", typ "prop => prop => prop", Delimfix "op ==>"), (const Term.dummy_patternN, typ "aprop", Delimfix "'_"), ("_sort_constraint", typ "type => prop", Delimfix "(1SORT'_CONSTRAINT/(1'(_')))"),