diff options
author | ppedrot <ppedrot@85f007b7-540e-0410-9357-904b9bb8a0f7> | 2012-11-25 17:39:07 +0000 |
---|---|---|
committer | ppedrot <ppedrot@85f007b7-540e-0410-9357-904b9bb8a0f7> | 2012-11-25 17:39:07 +0000 |
commit | b35582012e9f7923ca2e55bfbfae9215770f8fbd (patch) | |
tree | 21ec39af08f0d8ce1b33272443518e843a9d5c28 /library/libobject.ml | |
parent | 9489721652bb443b5ed680701d94283737038f0b (diff) |
Monomorphization (library)
git-svn-id: svn+ssh://scm.gforge.inria.fr/svn/coq/trunk@16001 85f007b7-540e-0410-9357-904b9bb8a0f7
Diffstat (limited to 'library/libobject.ml')
-rw-r--r-- | library/libobject.ml | 15 |
1 files changed, 8 insertions, 7 deletions
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; |