src/Pure/Isar/proof_context.ML
changeset 9504 8168600e88a5
parent 9470 705ca49129fc
child 9515 e6dfc9c9bf89
equal deleted inserted replaced
9503:3324cbbecef8 9504:8168600e88a5
    25   val print_proof_data: theory -> unit
    25   val print_proof_data: theory -> unit
    26   val init: theory -> context
    26   val init: theory -> context
    27   val assumptions: context -> (cterm list * exporter) list
    27   val assumptions: context -> (cterm list * exporter) list
    28   val fixed_names: context -> string list
    28   val fixed_names: context -> string list
    29   val read_typ: context -> string -> typ
    29   val read_typ: context -> string -> typ
       
    30   val read_typ_no_norm: context -> string -> typ
    30   val cert_typ: context -> typ -> typ
    31   val cert_typ: context -> typ -> typ
       
    32   val cert_typ_no_norm: context -> typ -> typ
    31   val intern_skolem: context -> term -> term
    33   val intern_skolem: context -> term -> term
    32   val extern_skolem: context -> term -> term
    34   val extern_skolem: context -> term -> term
    33   val read_termTs: context -> (string * typ) list -> term list * (indexname * typ) list
    35   val read_termTs: context -> (string * typ) list -> term list * (indexname * typ) list
    34   val read_term: context -> string -> term
    36   val read_term: context -> string -> term
    35   val read_prop: context -> string -> term
    37   val read_prop: context -> string -> term
   375 
   377 
   376 
   378 
   377 
   379 
   378 (** prepare types **)
   380 (** prepare types **)
   379 
   381 
   380 fun read_typ ctxt s =
   382 local
   381   transform_error (Sign.read_typ (sign_of ctxt, def_sort ctxt)) s
   383 
       
   384 fun read_typ_aux read ctxt s =
       
   385   transform_error (read (sign_of ctxt, def_sort ctxt)) s
   382     handle ERROR_MESSAGE msg => raise CONTEXT (msg, ctxt);
   386     handle ERROR_MESSAGE msg => raise CONTEXT (msg, ctxt);
   383 
   387 
   384 fun cert_typ ctxt raw_T =
   388 fun cert_typ_aux cert ctxt raw_T = cert (sign_of ctxt) raw_T
   385   Sign.certify_typ (sign_of ctxt) raw_T
   389   handle TYPE (msg, _, _) => raise CONTEXT (msg, ctxt);
   386     handle TYPE (msg, _, _) => raise CONTEXT (msg, ctxt);
   390 
       
   391 in
       
   392 
       
   393 val read_typ         = read_typ_aux Sign.read_typ;
       
   394 val read_typ_no_norm = read_typ_aux Sign.read_typ_no_norm;
       
   395 val cert_typ         = cert_typ_aux Sign.certify_typ;
       
   396 val cert_typ_no_norm = cert_typ_aux Sign.certify_typ_no_norm;
       
   397 
       
   398 end;
       
   399 
   387 
   400 
   388 
   401 
   389 (* internalize Skolem constants *)
   402 (* internalize Skolem constants *)
   390 
   403 
   391 fun fixes_of (Context {asms = (_, (fixes, _)), ...}) = fixes;
   404 fun fixes_of (Context {asms = (_, (fixes, _)), ...}) = fixes;