| LexiconAst.Ident_alias (name, uri) ->
uri, `Sym_interp
(fun l->assert(l = []);
- let nuri = NUri.uri_of_string uri in
try
+ let nref = NReference.reference_of_string uri in
+ NCic.Const nref
+(*
let _,height,_,_,obj = NCicEnvironment.get_checked_obj nuri in
let spec =
match obj with
NCic.Const (NReference.reference_of_spec nuri spec)
with
NCicEnvironment.ObjectNotFound _ ->
- let uri = UriManager.uri_of_string uri in
- fst (OCic2NCic.convert_term uri (CicUtil.term_of_uri uri)))
+*)
+ with
+ NReference.IllFormedReference _ ->
+ let uri = UriManager.uri_of_string uri in
+ fst (OCic2NCic.convert_term uri (CicUtil.term_of_uri uri)))
;;
let rex = Str.regexp ("^"^ident^"$") in
if Str.string_match rex id 0 then
if (try ignore (UriManager.uri_of_string uri); true
- with UriManager.IllFormedUri _ -> false)
+ with UriManager.IllFormedUri _ -> false) ||
+ (try ignore (NReference.reference_of_string uri); true
+ with NReference.IllFormedReference _ -> false)
then
L.Ident_alias (id, uri)
- else
+ else
raise
(HExtlib.Localized (loc, CicNotationParser.Parse_error (Printf.sprintf "Not a valid uri: %s" uri)))
else
ndefinition thesis0: ∀A:Type.Type ≝ λA. A → A.
-alias id "thesis0" = "cic:/matita/tests/ng_commands/thesis0.con".
+alias id "thesis0" = "cic:/matita/tests/ng_commands/thesis0.def(0)".
ndefinition thesis: ∀A:Type.Type ≝ λA. ?.
napply (A → A);
nqed.
-alias id "thesis" = "cic:/matita/tests/ng_commands/thesis.con".
+alias id "thesis" = "cic:/matita/tests/ng_commands/thesis.def(0)".
ntheorem foo: ∀A:Type.thesis A.#A;#x;napply x;
nqed.
-alias id "foo" = "cic:/matita/tests/ng_commands/foo.con".
+alias id "foo" = "cic:/matita/tests/ng_commands/foo.def(0)".
ntheorem goo: ∀A:Type.A → A. #A; napply (foo ?);
nqed.
naxiom P: Prop.
-alias id "P" = "cic:/matita/tests/ng_commands/P.con".
+alias id "P" = "cic:/matita/tests/ng_commands/P.decl".
ndefinition Q: Prop ≝ P.
[ O ⇒ O
| S m ⇒ nzero m].
-alias id "nzero" = "cic:/matita/tests/ng_commands/nzero.con".
+alias id "nzero" = "cic:/matita/tests/ng_commands/nzero.fix(0,0,0)".
ntheorem nzero_ok: nzero (S (S O)) = O.
napply (refl_eq ? O);