let set kf b = let state = Proxy.get_state kf in try let v = find_data kf state in v := b with Not_found -> add kf [ state ] (ref b)