let add_subst2 (s : ('a,'b) s) (x, t) = try let t' = (List.assoc x s) in if t = t' then s else raise (Match_exc ("Variable "^x^" already assigned")) with Not_found -> (x,t)::s