git-svn-id: http://caml.inria.fr/svn/ocaml/branches/constructors_with_record4@15431 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
master
Alain Frisch 2014-10-03 11:38:38 +00:00
parent 4bd0d66cac
commit 84fb49c665
1 changed files with 5 additions and 8 deletions

View File

@ -475,14 +475,11 @@ and find_class =
and find_cltype =
find (fun env -> env.cltypes) (fun sc -> sc.comp_cltypes)
let type_of_cstr path cstr =
let tdecl =
match cstr.cstr_inlined with
| None -> assert false
| Some d -> d
in
let labels = Datarepr.labels_of_type path tdecl in
(tdecl, ([], List.map snd labels))
let type_of_cstr path = function
| {cstr_inlined = Some d; _} ->
(d, ([], List.map snd (Datarepr.labels_of_type path d)))
| _ ->
assert false
let find_type_full path env =
match Path.constructor_typath path with