154 val update_cases: (string * Rule_Cases.T option) list -> Proof.context -> Proof.context |
154 val update_cases: (string * Rule_Cases.T option) list -> Proof.context -> Proof.context |
155 val apply_case: Rule_Cases.T -> Proof.context -> (string * term list) list * Proof.context |
155 val apply_case: Rule_Cases.T -> Proof.context -> (string * term list) list * Proof.context |
156 val check_case: Proof.context -> bool -> |
156 val check_case: Proof.context -> bool -> |
157 string * Position.T -> binding option list -> Rule_Cases.T |
157 string * Position.T -> binding option list -> Rule_Cases.T |
158 val check_syntax_const: Proof.context -> string * Position.T -> string |
158 val check_syntax_const: Proof.context -> string * Position.T -> string |
|
159 val syntax: bool -> Syntax.mode -> (string * typ * mixfix) list -> |
|
160 Proof.context -> Proof.context |
|
161 val generic_syntax: bool -> Syntax.mode -> (string * typ * mixfix) list -> |
|
162 Context.generic -> Context.generic |
159 val type_notation: bool -> Syntax.mode -> (typ * mixfix) list -> Proof.context -> Proof.context |
163 val type_notation: bool -> Syntax.mode -> (typ * mixfix) list -> Proof.context -> Proof.context |
160 val notation: bool -> Syntax.mode -> (term * mixfix) list -> Proof.context -> Proof.context |
164 val notation: bool -> Syntax.mode -> (term * mixfix) list -> Proof.context -> Proof.context |
161 val generic_type_notation: bool -> Syntax.mode -> (typ * mixfix) list -> morphism -> |
165 val generic_type_notation: bool -> Syntax.mode -> (typ * mixfix) list -> morphism -> |
162 Context.generic -> Context.generic |
166 Context.generic -> Context.generic |
163 val generic_notation: bool -> Syntax.mode -> (term * mixfix) list -> morphism -> |
167 val generic_notation: bool -> Syntax.mode -> (term * mixfix) list -> morphism -> |
1128 |
1132 |
1129 fun check_syntax_const ctxt (c, pos) = |
1133 fun check_syntax_const ctxt (c, pos) = |
1130 if is_some (Syntax.lookup_const (syn_of ctxt) c) then c |
1134 if is_some (Syntax.lookup_const (syn_of ctxt) c) then c |
1131 else error ("Unknown syntax const: " ^ quote c ^ Position.here pos); |
1135 else error ("Unknown syntax const: " ^ quote c ^ Position.here pos); |
1132 |
1136 |
|
1137 fun syntax add mode args ctxt = |
|
1138 let val args' = map (pair Local_Syntax.Const) args |
|
1139 in ctxt |> map_syntax (#2 o Local_Syntax.update_modesyntax ctxt add mode args') end; |
|
1140 |
|
1141 fun generic_syntax add mode args = |
|
1142 Context.mapping (Sign.syntax add mode args) (syntax add mode args); |
|
1143 |
1133 |
1144 |
1134 (* notation *) |
1145 (* notation *) |
1135 |
1146 |
1136 local |
1147 local |
1137 |
1148 |