src/Pure/Isar/proof_context.ML
changeset 42223 098c86e53153
parent 42204 b3277168c1e7
child 42224 578a51fae383
equal deleted inserted replaced
42222:ff50c436b199 42223:098c86e53153
    65   val allow_dummies: Proof.context -> Proof.context
    65   val allow_dummies: Proof.context -> Proof.context
    66   val check_tvar: Proof.context -> indexname * sort -> indexname * sort
    66   val check_tvar: Proof.context -> indexname * sort -> indexname * sort
    67   val check_tfree: Proof.context -> string * sort -> string * sort
    67   val check_tfree: Proof.context -> string * sort -> string * sort
    68   val type_context: Proof.context -> Syntax.type_context
    68   val type_context: Proof.context -> Syntax.type_context
    69   val term_context: Proof.context -> Syntax.term_context
    69   val term_context: Proof.context -> Syntax.term_context
    70   val decode_term: Proof.context -> Position.reports * term -> Position.reports * term
    70   val decode_term: Proof.context ->
       
    71     Position.reports * term Exn.result -> Position.reports * term Exn.result
    71   val standard_infer_types: Proof.context -> term list -> term list
    72   val standard_infer_types: Proof.context -> term list -> term list
    72   val read_term_pattern: Proof.context -> string -> term
    73   val read_term_pattern: Proof.context -> string -> term
    73   val read_term_schematic: Proof.context -> string -> term
    74   val read_term_schematic: Proof.context -> string -> term
    74   val read_term_abbrev: Proof.context -> string -> term
    75   val read_term_abbrev: Proof.context -> string -> term
    75   val show_abbrevs_raw: Config.raw
    76   val show_abbrevs_raw: Config.raw
   782         Type (c, _) =>
   783         Type (c, _) =>
   783           if c <> "prop" andalso Type.is_logtype (tsig_of ctxt) c
   784           if c <> "prop" andalso Type.is_logtype (tsig_of ctxt) c
   784           then default_root else c
   785           then default_root else c
   785       | _ => default_root);
   786       | _ => default_root);
   786 
   787 
   787     fun check t = (Syntax.check_term ctxt (Type.constraint T' t); NONE)
   788     fun check t = (Syntax.check_term ctxt (Type.constraint T' t); Exn.Result t)
   788       handle ERROR msg => SOME msg;
   789       handle exn as ERROR _ => Exn.Exn exn;
   789     val t =
   790     val t =
   790       Syntax.standard_parse_term check ctxt (type_context ctxt) (term_context ctxt) (syn_of ctxt)
   791       Syntax.standard_parse_term check ctxt (type_context ctxt) (term_context ctxt) (syn_of ctxt)
   791         root (syms, pos)
   792         root (syms, pos)
   792       handle ERROR msg => parse_failed ctxt pos msg kind;
   793       handle ERROR msg => parse_failed ctxt pos msg kind;
   793   in t end;
   794   in t end;