src/Pure/type_infer.ML
changeset 19046 bc5c6c9b114e
parent 19012 2577ac76cdc6
child 19465 e6093a7fa53a
equal deleted inserted replaced
19045:75786c2eb897 19046:bc5c6c9b114e
   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 =