let obj = uri,height,[],[],obj_kind in
let old_status = status in
let status = NCicLibrary.add_obj status obj in
+ HLog.message ("New object: " ^ NUri.string_of_uri uri);
(try
(*prerr_endline (NCicPp.ppobj obj);*)
let boxml = NCicElim.mk_elims obj in
let status = LexiconSync.add_aliases_for_objs status (`New [uri]) in
List.fold_left
(fun (status,uris) boxml ->
- let status,nuris =
- eval_ncommand opts status
- ("",0,GrafiteAst.NObj (HExtlib.dummy_floc,boxml))
- in
- match uris,nuris with
- `New uris, `New nuris -> status,`New (nuris@uris)
- | _ -> assert false
+ try
+ let status,nuris =
+ eval_ncommand opts status
+ ("",0,GrafiteAst.NObj (HExtlib.dummy_floc,boxml))
+ in
+ match uris,nuris with
+ `New uris, `New nuris -> status,`New (nuris@uris)
+ | _ -> assert false
+ with
+ NCicTypeChecker.TypeCheckerFailure msg
+ when Lazy.force msg =
+ "Sort elimination not allowed" ->
+ status,uris
) (status,`New [] (* uris *)) boxml
with
exn ->