let ctyp_long_id t =
match t with
| Ast.TyId (_, i) -> (false, (long_type_ident i))
| TyApp (loc, _, _) -> error loc "invalid type name"
| TyCls (_, i) -> (true, (ident i))
| t -> error (loc_of_ctyp t) "invalid type"