From dccaed2452e544308b46f0c73ffd4f542ef4c8c6 Mon Sep 17 00:00:00 2001 From: Emilio Jesus Gallego Arias Date: Fri, 26 Oct 2018 10:24:18 +0200 Subject: [libobject] Move object_name next to object definition. `object_name` is a particular choice of the implementation of `Liboject`, thus it makes sense to tie it to that particular module. This may prove useful in the future as we may want to modify object naming. --- library/libobject.ml | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'library/libobject.ml') diff --git a/library/libobject.ml b/library/libobject.ml index 79a3fed1b9..ea19fbb90b 100644 --- a/library/libobject.ml +++ b/library/libobject.ml @@ -16,6 +16,12 @@ module Dyn = Dyn.Make () type 'a substitutivity = Dispose | Substitute of 'a | Keep of 'a | Anticipate of 'a +type object_name = Libnames.full_path * Names.KerName.t + +(* let make_oname (dirpath,(mp,dir)) id = *) +let make_oname { obj_dir; obj_mp } id = + Names.(make_path obj_dir id, KerName.make obj_mp (Label.of_id id)) + type 'a object_declaration = { object_name : string; cache_function : object_name * 'a -> unit; -- cgit v1.2.3