Make.ResumptionsSourceA resumption store module for the weighting scheme being used
The type of the resumption store
The type of the computation, 'a being the type of the computational state to be stored
The type of the weight of the computational states
empty ~alt_max returns an empty resumption store. alt_max defines the maximal number of states to be stored while keeping sorted according to w.
regular_sorting r returns true if r still uses regular sorting and false otherwise.
is_empty r returns true if r contains no computational states.
val extend_resumptions :
computation:'a computation ->
weight:w ->
'a resumptions ->
'a resumptionsextend_resumptions ~computation ~weight r returns r to which the computational state computation with weight weight was added.
pp fmt r pretty prints the resumption store r on the formatter fmt.
val swap :
?current_computation:('a computation * w) ->
'a resumptions ->
'a computation * w * 'a resumptionsswap ~current_computation r returns (c,w,r') where r' is r to which current_computation was added and c, whose weight is w, was removed. If r is such that regular sorting is disabled, r' is r and (c,w) is current_computation.