let rec lookup_var_type_from_local frames (id : identifier) =
  match frames with
    [] -> raise Not_found
  | hd::tl ->
      try
        let a = (List.assoc id hd) in
        (a.lbind_new_name, a.lbind_type)
      with
        Not_found -> lookup_var_type_from_local tl id