diff options
author | 1999-12-15 15:24:13 +0000 | |
---|---|---|
committer | 1999-12-15 15:24:13 +0000 | |
commit | d44846131cf2fab2d3c45d435b84d802b1af8d43 (patch) | |
tree | 20de854b9ba4de7cbd01470559e956451a1d5d8e /toplevel/command.ml | |
parent | 490c8fa3145e861966dd83f6dc9478b0b96de470 (diff) |
Nouveaux types 'constructor' et 'inductive' dans Term;
les fonctions sur les inductifs prennent maintenant des 'inductive' en
paramètres; elle n'ont plus besoin de faire des appels dangereux
aux find_m*type qui centralisent la levée de raise Induc.
git-svn-id: svn+ssh://scm.gforge.inria.fr/svn/coq/trunk@257 85f007b7-540e-0410-9357-904b9bb8a0f7
Diffstat (limited to 'toplevel/command.ml')
-rw-r--r-- | toplevel/command.ml | 15 |
1 files changed, 8 insertions, 7 deletions
diff --git a/toplevel/command.ml b/toplevel/command.ml index c1860012b..ce804aa7f 100644 --- a/toplevel/command.ml +++ b/toplevel/command.ml @@ -337,15 +337,16 @@ let build_corecursive lnameardef = in () -exception NotInductive let inductive_of_ident id = - try match kind_of_term (global_reference CCI id) with + let c = + try global_reference CCI id + with Not_found -> + errorlabstrm "inductive_of_ident" ((string_of_id id) ^ " not found") + in + match kind_of_term (global_reference CCI id) with | IsMutInd ind -> ind - | _ -> raise NotInductive - with Not_found | NotInductive -> - errorlabstrm "inductive_of_ident" - [< 'sTR (string_of_id id); 'sPC; - 'sTR "is not an inductive type" >] + | _ -> errorlabstrm "inductive_of_ident" + [< 'sTR (string_of_id id); 'sPC; 'sTR "is not an inductive type" >] let build_scheme lnamedepindsort = let lrecnames = List.map (fun (f,_,_,_) -> f) lnamedepindsort |