diff options
author | 2013-08-08 18:52:47 +0000 | |
---|---|---|
committer | 2013-08-08 18:52:47 +0000 | |
commit | 80aba8d52c650ef8e4ada694c20bf12c15849694 (patch) | |
tree | 74a6bba0cf4661a2b1319c7b94e6a4f165becadc /proofs/proof_global.ml | |
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/proof_global.ml')
-rw-r--r-- | proofs/proof_global.ml | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/proofs/proof_global.ml b/proofs/proof_global.ml index 0c0aac715..470d19b71 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 () |