From 47b699b7d72630d2edc512594a2c813d7fb2f7a6 Mon Sep 17 00:00:00 2001 From: Pierre-Marie Pédrot Date: Thu, 20 Jul 2017 14:47:24 +0200 Subject: Documenting the purity / marshallability invariant of persistent states. --- library/libobject.mli | 3 +++ library/summary.mli | 2 ++ 2 files changed, 5 insertions(+) diff --git a/library/libobject.mli b/library/libobject.mli index 1a21ece2b..6f935bffe 100644 --- a/library/libobject.mli +++ b/library/libobject.mli @@ -56,6 +56,9 @@ open Mod_subst rebuild the non volatile content of a section from the data collected by the discharge function + Any type defined as a persistent object must be pure (e.g. no references) and + marshallable by the OCaml Marshal module (e.g. no closures). + *) type 'a substitutivity = diff --git a/library/summary.mli b/library/summary.mli index a6ad49950..d093d95f2 100644 --- a/library/summary.mli +++ b/library/summary.mli @@ -14,6 +14,8 @@ type marshallable = | `No (* Full data will be store in memory, e.g. for Undo *) | `Shallow ] (* Only part of the data will be marshalled to a slave process *) +(** Types of global Coq states. The ['a] type should be pure and marshallable by + the standard OCaml marshalling function. *) type 'a summary_declaration = { (** freeze_function [true] is for marshalling to disk. * e.g. lazy must be forced *) -- cgit v1.2.3