From b35582012e9f7923ca2e55bfbfae9215770f8fbd Mon Sep 17 00:00:00 2001 From: ppedrot Date: Sun, 25 Nov 2012 17:39:07 +0000 Subject: Monomorphization (library) git-svn-id: svn+ssh://scm.gforge.inria.fr/svn/coq/trunk@16001 85f007b7-540e-0410-9357-904b9bb8a0f7 --- library/libobject.ml | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) (limited to 'library/libobject.ml') diff --git a/library/libobject.ml b/library/libobject.ml index ffd87ce80..81f306a33 100644 --- a/library/libobject.ml +++ b/library/libobject.ml @@ -6,6 +6,7 @@ (* * GNU Lesser General Public License Version 2.1 *) (************************************************************************) +open Util open Errors open Libnames open Mod_subst @@ -82,20 +83,20 @@ let declare_object_full odecl = let na = odecl.object_name in let (infun,outfun) = Dyn.create na in let cacher (oname,lobj) = - if Dyn.tag lobj = na then odecl.cache_function (oname,outfun lobj) + if String.equal (Dyn.tag lobj) na then odecl.cache_function (oname,outfun lobj) else anomaly "somehow we got the wrong dynamic object in the cachefun" and loader i (oname,lobj) = - if Dyn.tag lobj = na then odecl.load_function i (oname,outfun lobj) + if String.equal (Dyn.tag lobj) na then odecl.load_function i (oname,outfun lobj) else anomaly "somehow we got the wrong dynamic object in the loadfun" and opener i (oname,lobj) = - if Dyn.tag lobj = na then odecl.open_function i (oname,outfun lobj) + if String.equal (Dyn.tag lobj) na then odecl.open_function i (oname,outfun lobj) else anomaly "somehow we got the wrong dynamic object in the openfun" and substituter (sub,lobj) = - if Dyn.tag lobj = na then + if String.equal (Dyn.tag lobj) na then infun (odecl.subst_function (sub,outfun lobj)) else anomaly "somehow we got the wrong dynamic object in the substfun" and classifier lobj = - if Dyn.tag lobj = na then + if String.equal (Dyn.tag lobj) na then match odecl.classify_function (outfun lobj) with | Dispose -> Dispose | Substitute obj -> Substitute (infun obj) @@ -104,12 +105,12 @@ let declare_object_full odecl = else anomaly "somehow we got the wrong dynamic object in the classifyfun" and discharge (oname,lobj) = - if Dyn.tag lobj = na then + if String.equal (Dyn.tag lobj) na then Option.map infun (odecl.discharge_function (oname,outfun lobj)) else anomaly "somehow we got the wrong dynamic object in the dischargefun" and rebuild lobj = - if Dyn.tag lobj = na then infun (odecl.rebuild_function (outfun lobj)) + if String.equal (Dyn.tag lobj) na then infun (odecl.rebuild_function (outfun lobj)) else anomaly "somehow we got the wrong dynamic object in the rebuildfun" in Hashtbl.add cache_tab na { dyn_cache_function = cacher; -- cgit v1.2.3