diff options
| author | msozeau | 2008-11-09 16:17:14 +0000 |
|---|---|---|
| committer | msozeau | 2008-11-09 16:17:14 +0000 |
| commit | 3f5ce5cbf138435fcf7e50bf978192c9fdd7db05 (patch) | |
| tree | 233c3444ff46fe4b5d1a26047cfd91d4305cb73b /toplevel/command.ml | |
| parent | 722ff72af621e09a1772d56613fd930b4ad7245a (diff) | |
More factorization of inductive/record and typeclasses: move class
declaration code to toplevel/record, including support for singleton
classes as definitions. Parsing code also factorized. Arnaud: one more
thing to think about when refactoring the definitions in vernacentries.
Add support for specifying what to do with anonymous variables in
contexts during internalisation (fixes bug #1982), current choice is to
generate a name for typeclass bindings.
git-svn-id: svn+ssh://scm.gforge.inria.fr/svn/coq/trunk@11563 85f007b7-540e-0410-9357-904b9bb8a0f7
Diffstat (limited to 'toplevel/command.ml')
| -rw-r--r-- | toplevel/command.ml | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/toplevel/command.ml b/toplevel/command.ml index 5cccc225cd..47c51b83fd 100644 --- a/toplevel/command.ml +++ b/toplevel/command.ml @@ -528,7 +528,9 @@ let interp_mutual paramsl indl notations finite = check_all_names_different indl; let env0 = Global.env() in let evdref = ref (Evd.create_evar_defs Evd.empty) in - let (env_params, ctx_params), userimpls = interp_context_evars evdref env0 paramsl in + let (env_params, ctx_params), userimpls = + interp_context_evars ~fail_anonymous:false evdref env0 paramsl + in let indnames = List.map (fun ind -> ind.ind_name) indl in (* Names of parameters as arguments of the inductive type (defs removed) *) @@ -622,7 +624,7 @@ let prepare_inductive ntnl indl = let indl = List.map (fun ((_,indname),_,ar,lc) -> { ind_name = indname; - ind_arity = ar; + ind_arity = Option.cata (fun x -> x) (CSort (dummy_loc, Rawterm.RType None)) ar; ind_lc = List.map (fun (_,((_,id),t)) -> (id,t)) lc }) indl in List.fold_right Option.List.cons ntnl [], indl |
