equal
deleted
inserted
replaced
459 fun get_sort tsig def_sort map_sort raw_env = |
459 fun get_sort tsig def_sort map_sort raw_env = |
460 let |
460 let |
461 fun eq ((xi: indexname, S), (xi', S')) = |
461 fun eq ((xi: indexname, S), (xi', S')) = |
462 xi = xi' andalso Type.eq_sort tsig (S, S'); |
462 xi = xi' andalso Type.eq_sort tsig (S, S'); |
463 |
463 |
464 val env = gen_distinct eq (map (apsnd map_sort) raw_env); |
464 val env = distinct eq (map (apsnd map_sort) raw_env); |
465 val _ = (case duplicates (eq_fst (op =)) env of [] => () |
465 val _ = (case duplicates (eq_fst (op =)) env of [] => () |
466 | dups => error ("Inconsistent sort constraints for type variable(s) " |
466 | dups => error ("Inconsistent sort constraints for type variable(s) " |
467 ^ commas_quote (map (Syntax.string_of_vname' o fst) dups))); |
467 ^ commas_quote (map (Syntax.string_of_vname' o fst) dups))); |
468 |
468 |
469 fun get xi = |
469 fun get xi = |