# HG changeset patch # User traytel # Date 1384783048 -3600 # Node ID 0a7341e3948ca07544ccb54329bd44fe23f08b81 # Parent f6ffe53387ef4d849627f47a22cc95d2da49e9e1 show all involved subtyping constraints that cause coercion inference to fail diff -r f6ffe53387ef -r 0a7341e3948c src/Tools/subtyping.ML --- a/src/Tools/subtyping.ML Mon Nov 18 12:26:00 2013 +0100 +++ b/src/Tools/subtyping.ML Mon Nov 18 14:57:28 2013 +0100 @@ -597,8 +597,8 @@ val assignment = if null bound orelse null not_params then NONE else SOME (tightest lower S styps_and_sorts (map nameT not_params) - handle BOUND_ERROR msg => - err_bound ctxt (gen_msg err msg) tye (find_error_pack lower key)) + handle BOUND_ERROR msg => err_bound ctxt (gen_msg err msg) tye + (maps (find_error_pack (not lower)) raw_bound)) in (case assignment of NONE => tye_idx @@ -614,7 +614,8 @@ else err_bound ctxt (gen_msg err ("assigned base type " ^ quote (Syntax.string_of_typ ctxt T) ^ " clashes with the upper bound of variable " ^ - Syntax.string_of_typ ctxt (TVar(xi, S)))) tye (find_error_pack (not lower) key) + Syntax.string_of_typ ctxt (TVar(xi, S)))) tye + (maps (find_error_pack lower) other_bound) end else apfst (Vartab.update (xi, T)) tye_idx) end