let subst_pattern env (_, p) = MetaPath.subst env p