equal
deleted
inserted
replaced
1254 explore params t |
1254 explore params t |
1255 else |
1255 else |
1256 let val T = fastype_of1 (bound_Ts, hd args) in |
1256 let val T = fastype_of1 (bound_Ts, hd args) in |
1257 (case (Option.mapPartial (ctr_sugar_of lthy) (try (fst o dest_Type) T), T <> res_T) of |
1257 (case (Option.mapPartial (ctr_sugar_of lthy) (try (fst o dest_Type) T), T <> res_T) of |
1258 (SOME {selss, T = Type (_, Ts), ...}, true) => |
1258 (SOME {selss, T = Type (_, Ts), ...}, true) => |
1259 (case const_of (fold (curry op @) selss []) fun_t of |
1259 (case const_of (flat selss) fun_t of |
1260 SOME sel => |
1260 SOME sel => |
1261 let |
1261 let |
1262 val args' = args |> map (typ_before explore params); |
1262 val args' = args |> map (typ_before explore params); |
1263 val Type (_, Us) = fastype_of1 (bound_Us, hd args'); |
1263 val Type (_, Us) = fastype_of1 (bound_Us, hd args'); |
1264 val sel' = sel |> Term.subst_TVars (map (fst o dest_TVar) Ts ~~ Us); |
1264 val sel' = sel |> Term.subst_TVars (map (fst o dest_TVar) Ts ~~ Us); |