equal
deleted
inserted
replaced
367 val (names1, names2) = Name.invent Name.context Name.aT (n + length extra) |> chop n; |
367 val (names1, names2) = Name.invent Name.context Name.aT (n + length extra) |> chop n; |
368 |
368 |
369 val present_map = |
369 val present_map = |
370 map2 (fn (T, S) => fn a => (T, TVar ((a, 0), S))) present names1; |
370 map2 (fn (T, S) => fn a => (T, TVar ((a, 0), S))) present names1; |
371 val constraints_map = |
371 val constraints_map = |
372 map2 (fn (_, S) => fn a => (S, TVar ((a, 0), S))) present names1 @ |
372 map (fn (_, V) => (Type.sort_of_atyp V, V)) present_map @ |
373 map2 (fn S => fn a => (S, TVar ((a, 0), S))) extra names2; |
373 map2 (fn S => fn a => (S, TVar ((a, 0), S))) extra names2; |
374 |
374 |
375 fun unconstrain_atyp {strip_sorts} T = |
375 fun unconstrain_atyp {strip_sorts} T = |
376 (case AList.lookup (op =) present_map T of |
376 (case AList.lookup (op =) present_map T of |
377 SOME U => U |> strip_sorts ? Type.strip_sorts |
377 SOME U => U |> strip_sorts ? Type.strip_sorts |