src/Pure/Proof/extraction.ML
changeset 42360 da8817d01e7c
parent 40844 5895c525739d
child 42375 774df7c59508
equal deleted inserted replaced
42359:6ca5407863ed 42360:da8817d01e7c
   160     | _ => error "get_var_type: not a variable"
   160     | _ => error "get_var_type: not a variable"
   161   end;
   161   end;
   162 
   162 
   163 fun read_term thy T s =
   163 fun read_term thy T s =
   164   let
   164   let
   165     val ctxt = ProofContext.init_global thy
   165     val ctxt = Proof_Context.init_global thy
   166       |> Proof_Syntax.strip_sorts_consttypes
   166       |> Proof_Syntax.strip_sorts_consttypes
   167       |> ProofContext.set_defsort [];
   167       |> Proof_Context.set_defsort [];
   168     val parse = if T = propT then Syntax.parse_prop else Syntax.parse_term;
   168     val parse = if T = propT then Syntax.parse_prop else Syntax.parse_term;
   169   in parse ctxt s |> Type.constraint T |> Syntax.check_term ctxt end;
   169   in parse ctxt s |> Type.constraint T |> Syntax.check_term ctxt end;
   170 
   170 
   171 
   171 
   172 (**** theory data ****)
   172 (**** theory data ****)