diff options
| author | msozeau | 2011-10-07 13:57:13 +0000 |
|---|---|---|
| committer | msozeau | 2011-10-07 13:57:13 +0000 |
| commit | 1f84b509851f3eead190eac2300ee77611ed9ff4 (patch) | |
| tree | 8b64f8de1bd1b12aeb91c88fc4e14fb4f5799efe /pretyping/typeclasses.ml | |
| parent | 8ab1c0c6d12c22e25d3ec309610106d2bfdb7ff4 (diff) | |
Fix bug #2557 and an issue with Propers for complement
git-svn-id: svn+ssh://scm.gforge.inria.fr/svn/coq/trunk@14523 85f007b7-540e-0410-9357-904b9bb8a0f7
Diffstat (limited to 'pretyping/typeclasses.ml')
| -rw-r--r-- | pretyping/typeclasses.ml | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/pretyping/typeclasses.ml b/pretyping/typeclasses.ml index 5447c21458..caee039e0e 100644 --- a/pretyping/typeclasses.ml +++ b/pretyping/typeclasses.ml @@ -337,9 +337,11 @@ let instance_constructor cl args = let lenpars = List.length (List.filter (fun (na, b, t) -> b = None) (snd cl.cl_context)) in let pars = fst (list_chop lenpars args) in match cl.cl_impl with - | IndRef ind -> applistc (mkConstruct (ind, 1)) args, + | IndRef ind -> Some (applistc (mkConstruct (ind, 1)) args), applistc (mkInd ind) pars - | ConstRef cst -> list_last args, applistc (mkConst cst) pars + | ConstRef cst -> + let term = if args = [] then None else Some (list_last args) in + term, applistc (mkConst cst) pars | _ -> assert false let typeclasses () = Gmap.fold (fun _ l c -> l :: c) !classes [] |
