+let push_proj f lenv a e = f (EProj (lenv, a, e))
+
+let push2 err f lenv attr ?t = match lenv, t with
+ | EBind (e, a, Abst ws), Some t -> f (EBind (e, (attr :: a), Abst (t :: ws)))
+ | EBind (e, a, Abbr vs), Some t -> f (EBind (e, (attr :: a), Abbr (t :: vs)))
+ | EBind (e, a, Void n), None -> f (EBind (e, (attr :: a), Void (succ n)))
+ | _ -> err ()
+
+(* this id not tail recursive *)