]> matita.cs.unibo.it Git - helm.git/commitdiff
uris relative to axioms are translated in the right way
authorEnrico Tassi <enrico.tassi@inria.fr>
Mon, 7 Apr 2008 16:17:16 +0000 (16:17 +0000)
committerEnrico Tassi <enrico.tassi@inria.fr>
Mon, 7 Apr 2008 16:17:16 +0000 (16:17 +0000)
helm/software/components/ng_kernel/oCic2NCic.ml

index f20df7c8064ffdc47faeea23ed4bd2fc4ba858e8..095b967a495975606fbc84ff1cedb2907ee93f39 100644 (file)
@@ -203,7 +203,12 @@ let convert_term uri t =
         | (NCic.Appl l1)::l2 -> NCic.Appl (l1@l2), fixpoints
         | _ -> NCic.Appl l, fixpoints)
     | Cic.Const (curi, _) -> 
-        NCic.Const (Ref.reference_of_ouri curi Ref.Def),[]
+        (match fst(CicEnvironment.get_obj CicUniv.oblivion_ugraph curi) with
+        | Cic.Constant (_,Some _,_,_,_) ->
+               NCic.Const (Ref.reference_of_ouri curi Ref.Def),[]
+        | Cic.Constant (_,None,_,_,_) ->
+               NCic.Const (Ref.reference_of_ouri curi Ref.Decl),[]
+        | _ -> assert false)
     | Cic.MutInd (curi, tyno, _) -> 
         NCic.Const (Ref.reference_of_ouri curi (Ref.Ind tyno)),[]
     | Cic.MutConstruct (curi, tyno, consno, _) ->