summaryrefslogtreecommitdiff
path: root/library/libobject.ml
diff options
context:
space:
mode:
authorGravatar Stephane Glondu <steph@glondu.net>2012-01-12 16:02:20 +0100
committerGravatar Stephane Glondu <steph@glondu.net>2012-01-12 16:02:20 +0100
commit97fefe1fcca363a1317e066e7f4b99b9c1e9987b (patch)
tree97ec6b7d831cc5fb66328b0c63a11db1cbb2f158 /library/libobject.ml
parent300293c119981054c95182a90c829058530a6b6f (diff)
Imported Upstream version 8.4~betaupstream/8.4_beta
Diffstat (limited to 'library/libobject.ml')
-rw-r--r--library/libobject.ml17
1 files changed, 9 insertions, 8 deletions
diff --git a/library/libobject.ml b/library/libobject.ml
index 7b61a386..bc62913d 100644
--- a/library/libobject.ml
+++ b/library/libobject.ml
@@ -1,13 +1,11 @@
(************************************************************************)
(* v * The Coq Proof Assistant / The Coq Development Team *)
-(* <O___,, * INRIA - CNRS - LIX - LRI - PPS - Copyright 1999-2011 *)
+(* <O___,, * INRIA - CNRS - LIX - LRI - PPS - Copyright 1999-2010 *)
(* \VV/ **************************************************************)
(* // * This file is distributed under the terms of the *)
(* * GNU Lesser General Public License Version 2.1 *)
(************************************************************************)
-(* $Id: libobject.ml 14641 2011-11-06 11:59:10Z herbelin $ *)
-
open Util
open Names
open Libnames
@@ -18,7 +16,7 @@ open Mod_subst
wants to work with restricted Coq programs that have only parts of
the full capabilities, but may still be able to work correctly for
limited purposes. One example is for the graphical interface, that uses
- such a limite coq process to do only parsing. It loads .vo files, but
+ such a limited Coq process to do only parsing. It loads .vo files, but
is only interested in loading the grammar rule definitions. *)
let relax_flag = ref false;;
@@ -57,7 +55,7 @@ let default_object s = {
declare_object { (default_object "MY OBJECT") with
cache_function = fun (sp,a) -> Mytbl.add sp a}
- and the listed functions are only those which definitions accually
+ and the listed functions are only those which definitions actually
differ from the default.
This helps introducing new functions in objects.
@@ -81,7 +79,7 @@ let object_tag lobj = Dyn.tag lobj
let cache_tab =
(Hashtbl.create 17 : (string,dynamic_object_declaration) Hashtbl.t)
-let declare_object odecl =
+let declare_object_full odecl =
let na = odecl.object_name in
let (infun,outfun) = Dyn.create na in
let cacher (oname,lobj) =
@@ -124,6 +122,8 @@ let declare_object odecl =
dyn_rebuild_function = rebuild };
(infun,outfun)
+let declare_object odecl = fst (declare_object_full odecl)
+
let missing_tab = (Hashtbl.create 17 : (string, unit) Hashtbl.t)
(* this function describes how the cache, load, open, and export functions
@@ -143,8 +143,9 @@ let apply_dyn_fun deflt f lobj =
Failure "local to_apply_dyn_fun" ->
if not (!relax_flag || Hashtbl.mem missing_tab tag) then
begin
- Pp.warning ("Cannot find library functions for an object with tag "
- ^ tag ^ " (a plugin may be missing)");
+ Pp.msg_warning
+ (Pp.str ("Cannot find library functions for an object with tag "
+ ^ tag ^ " (a plugin may be missing)"));
Hashtbl.add missing_tab tag ()
end;
deflt