diff options
author | 2004-06-02 15:14:37 +0000 | |
---|---|---|
committer | 2004-06-02 15:14:37 +0000 | |
commit | 3b70964b934c6395dadb4351a0c923c4c387f3d0 (patch) | |
tree | 69e9a74b4972b827504e031b251be9e7e3451d10 /toplevel | |
parent | 20097b592404c4ef732d45128fff92a594ed45cf (diff) |
Recherche de la source à partir de la gauche pour gérer des cas comme 'Coercion plus : nat >-> Funclass'
git-svn-id: svn+ssh://scm.gforge.inria.fr/svn/coq/trunk@5791 85f007b7-540e-0410-9357-904b9bb8a0f7
Diffstat (limited to 'toplevel')
-rw-r--r-- | toplevel/class.ml | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/toplevel/class.ml b/toplevel/class.ml index e8e8653c8..e6a65080e 100644 --- a/toplevel/class.ml +++ b/toplevel/class.ml @@ -187,15 +187,15 @@ let get_source lp source = in (cl1,lv1,1) | Some cl -> - let rec aux n = function + let rec aux = function | [] -> raise Not_found | t1::lt -> try let cl1,lv1 = find_class_type t1 in - if cl = cl1 then cl1,lv1,n + if cl = cl1 then cl1,lv1,(List.length lt+1) else raise Not_found - with Not_found -> aux (n+1) lt - in aux 1 lp + with Not_found -> aux lt + in aux (List.rev lp) let get_target t ind = if (ind > 1) then |