equal
deleted
inserted
replaced
80 fun read_termTs ctxt schematic ss Ts = |
80 fun read_termTs ctxt schematic ss Ts = |
81 let |
81 let |
82 fun parse T = if T = propT then Syntax.parse_prop ctxt else Syntax.parse_term ctxt; |
82 fun parse T = if T = propT then Syntax.parse_prop ctxt else Syntax.parse_term ctxt; |
83 val ts = map2 parse Ts ss; |
83 val ts = map2 parse Ts ss; |
84 val ts' = |
84 val ts' = |
85 map2 (Type_Infer.constrain o Type_Infer.paramify_vars) Ts ts |
85 map2 (Type.constraint o Type_Infer.paramify_vars) Ts ts |
86 |> Syntax.check_terms ((schematic ? ProofContext.set_mode ProofContext.mode_schematic) ctxt) |
86 |> Syntax.check_terms ((schematic ? ProofContext.set_mode ProofContext.mode_schematic) ctxt) |
87 |> Variable.polymorphic ctxt; |
87 |> Variable.polymorphic ctxt; |
88 val Ts' = map Term.fastype_of ts'; |
88 val Ts' = map Term.fastype_of ts'; |
89 val tyenv = fold Type.raw_match (Ts ~~ Ts') Vartab.empty; |
89 val tyenv = fold Type.raw_match (Ts ~~ Ts') Vartab.empty; |
90 in (ts', map (apsnd snd) (Vartab.dest tyenv)) end; |
90 in (ts', map (apsnd snd) (Vartab.dest tyenv)) end; |