diff options
| author | gareuselesinge | 2013-08-08 18:52:47 +0000 |
|---|---|---|
| committer | gareuselesinge | 2013-08-08 18:52:47 +0000 |
| commit | 80aba8d52c650ef8e4ada694c20bf12c15849694 (patch) | |
| tree | 74a6bba0cf4661a2b1319c7b94e6a4f165becadc /proofs | |
| parent | b9d45d500d6cb12494bd6cb41bbe29a9bbb9ffd3 (diff) | |
enhance marshallable option for freeze (minor TODO in safe_typing)
It can be:
`Yes Full data, in a state that can be marshalled
`No Full data, good for Undo only
`Shallow Partial data, marshallable, good for slave processes
git-svn-id: svn+ssh://scm.gforge.inria.fr/svn/coq/trunk@16682 85f007b7-540e-0410-9357-904b9bb8a0f7
Diffstat (limited to 'proofs')
| -rw-r--r-- | proofs/proof_global.ml | 9 | ||||
| -rw-r--r-- | proofs/proof_global.mli | 2 |
2 files changed, 9 insertions, 2 deletions
diff --git a/proofs/proof_global.ml b/proofs/proof_global.ml index 0c0aac715a..470d19b718 100644 --- a/proofs/proof_global.ml +++ b/proofs/proof_global.ml @@ -391,6 +391,13 @@ module V82 = struct end type state = pstate list -let freeze () = !pstates +let drop_hook_mode p = { p with hook = None; mode = None } + +let freeze ~marshallable = + match marshallable with + | `Yes -> + Errors.anomaly (Pp.str"full marshalling of proof state not supported") + | `Shallow -> List.map drop_hook_mode !pstates + | `No -> !pstates let unfreeze s = pstates := s; update_proof_mode () diff --git a/proofs/proof_global.mli b/proofs/proof_global.mli index a5fe33992f..61bb5c0dd8 100644 --- a/proofs/proof_global.mli +++ b/proofs/proof_global.mli @@ -140,5 +140,5 @@ module V82 : sig end type state -val freeze : unit -> state +val freeze : marshallable:[`Yes | `No | `Shallow] -> state val unfreeze : state -> unit |
