let paolab lab p =
match (lab, p) with
| ("",
(Ast.PaId (_, (Ast.IdLid (_, i))) |
Ast.PaTyc (_, (Ast.PaId (_, (Ast.IdLid (_, i)))), _)))
-> i
| ("", p) -> error (loc_of_patt p) "bad ast in label"
| _ -> lab