Skip to content

Commit aa16865

Browse files
committed
[ccache] play safe with STM
1 parent 5a6c5ce commit aa16865

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

src/coq_elpi_vernacular.ml

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -622,7 +622,11 @@ let debug vl = debug_vars := List.fold_right EC.StrSet.add vl EC.StrSet.empty
622622
let bound_steps n =
623623
if n <= 0 then max_steps := default_max_step else max_steps := n
624624

625-
let compiler_cache = ref SLMap.empty
625+
(* Units are marshalable, but programs are not *)
626+
let compiler_cache = Summary.ref
627+
~freeze:(fun ~marshallable x -> if marshallable then SLMap.empty else x)
628+
~name:"elpi-compiler-cache"
629+
SLMap.empty
626630

627631
let compile name baseul extra =
628632
try

0 commit comments

Comments
 (0)