From: Claudio Sacerdoti Coen Date: Sat, 18 Feb 2006 19:31:28 +0000 (+0000) Subject: Bug fixed: the source and target of declared parametric coercions used to X-Git-Tag: 0.4.95@7852~1652 X-Git-Url: http://matita.cs.unibo.it/gitweb/?a=commitdiff_plain;h=a5f945ea6f0fc6df47d90d00a75b6e7cce8e008e;p=helm.git Bug fixed: the source and target of declared parametric coercions used to be URIs of the inductive block instead of being URIs of single inductive types or constructors. --- diff --git a/components/library/coercDb.ml b/components/library/coercDb.ml index 7203f3647..c5356b3e1 100644 --- a/components/library/coercDb.ml +++ b/components/library/coercDb.ml @@ -32,15 +32,13 @@ exception EqCarrOnNonMetaClosed let db = ref [] let coerc_carr_of_term t = - try - Uri (CicUtil.uri_of_term t) - with Invalid_argument _ -> - match t with - | Cic.Sort s -> Sort s - | Cic.Appl ((Cic.Const (uri, _))::_) - | Cic.Appl ((Cic.MutInd (uri, _, _))::_) - | Cic.Appl ((Cic.MutConstruct (uri, _, _, _))::_) -> Uri uri - | t -> Term t + try + match t with + Cic.Sort s -> Sort s + | Cic.Appl (t::_) + | t -> Uri (CicUtil.uri_of_term t) + with Invalid_argument _ -> + Term t ;; let rec name_of_carr = function