-
-let name_of_inductive_type uri i =
- let types, _ = get_types uri in
- let (name, _, _, _) = try List.nth types i with Not_found -> assert false in
- name
-
- (* returns <name, type> pairs *)
-let constructors_of_inductive_type uri i =
- let types, _ = get_types uri in
- let (_, _, _, constructors) =
- try List.nth types i with Not_found -> assert false
- in
- constructors
-
- (* returns name only *)
-let constructor_of_inductive_type uri i j =
- (try
- fst (List.nth (constructors_of_inductive_type uri i) (j-1))
- with Not_found -> assert false)
-
- (* returns the number of left parameters *)
-let left_params_no_of_inductive_type uri =
- snd (get_types uri)