feat: add unify to propagate type info backward

1. unify(Type target_type, State env) will try to match the target_type, then update relevant type entries in env.