aboutsummaryrefslogtreecommitdiff
path: root/library/summary.ml
diff options
context:
space:
mode:
authorPierre-Marie Pédrot2015-12-04 21:46:12 +0100
committerPierre-Marie Pédrot2015-12-04 21:55:31 +0100
commit153d77d00ccbacf22aa5d70ca2c1cacab2749339 (patch)
tree98997d190ad1b45f3096473c1015feae55b64efe /library/summary.ml
parent0aba678e885fa53fa649de59eb1d06b4af3a847c (diff)
Specializing the Dyn module to each usecase.
Actually, we never mix the various uses of each dynamic type created through the Dyn module. To enforce this statically, we functorize the Dyn module so that we recover a fresh instance at each use point.
Diffstat (limited to 'library/summary.ml')
-rw-r--r--library/summary.ml4
1 files changed, 4 insertions, 0 deletions
diff --git a/library/summary.ml b/library/summary.ml
index 8e2abbf15b..6ef4e131c7 100644
--- a/library/summary.ml
+++ b/library/summary.ml
@@ -10,6 +10,8 @@ open Pp
open Errors
open Util
+module Dyn = Dyn.Make(struct end)
+
type marshallable = [ `Yes | `No | `Shallow ]
type 'a summary_declaration = {
freeze_function : marshallable -> 'a;
@@ -176,3 +178,5 @@ let ref ?(freeze=fun _ r -> r) ~name x =
unfreeze_function = ((:=) r);
init_function = (fun () -> r := x) };
r
+
+let dump = Dyn.dump