equal
deleted
inserted
replaced
211 in axioms' end); |
211 in axioms' end); |
212 |
212 |
213 |
213 |
214 (* dependencies *) |
214 (* dependencies *) |
215 |
215 |
216 fun const_dep thy (c, T) = ((Defs.Constant, c), Sign.const_typargs thy (c, T)); |
216 fun const_dep thy (c, T) = ((Defs.Const, c), Sign.const_typargs thy (c, T)); |
217 fun type_dep (c, args) = ((Defs.Type, c), args); |
217 fun type_dep (c, args) = ((Defs.Type, c), args); |
218 |
218 |
219 fun dependencies ctxt unchecked def description lhs rhs = |
219 fun dependencies ctxt unchecked def description lhs rhs = |
220 let |
220 let |
221 val thy = Proof_Context.theory_of ctxt; |
221 val thy = Proof_Context.theory_of ctxt; |
235 else error ("Specification depends on extra type variables: " ^ |
235 else error ("Specification depends on extra type variables: " ^ |
236 commas_quote (map (Syntax.string_of_typ ctxt o TFree) rhs_extras) ^ |
236 commas_quote (map (Syntax.string_of_typ ctxt o TFree) rhs_extras) ^ |
237 "\nThe error(s) above occurred in " ^ quote description); |
237 "\nThe error(s) above occurred in " ^ quote description); |
238 in Defs.define ctxt unchecked def description (prep lhs) (map prep rhs) end; |
238 in Defs.define ctxt unchecked def description (prep lhs) (map prep rhs) end; |
239 |
239 |
240 fun cert_entry thy ((Defs.Constant, c), args) = |
240 fun cert_entry thy ((Defs.Const, c), args) = |
241 Sign.cert_term thy (Const (c, Sign.const_instance thy (c, args))) |
241 Sign.cert_term thy (Const (c, Sign.const_instance thy (c, args))) |
242 |> dest_Const |> const_dep thy |
242 |> dest_Const |> const_dep thy |
243 | cert_entry thy ((Defs.Type, c), args) = |
243 | cert_entry thy ((Defs.Type, c), args) = |
244 Sign.certify_typ thy (Type (c, args)) |> dest_Type |> type_dep; |
244 Sign.certify_typ thy (Type (c, args)) |> dest_Type |> type_dep; |
245 |
245 |