aboutsummaryrefslogtreecommitdiffhomepage
path: root/plugins/micromega
diff options
context:
space:
mode:
authorGravatar Pierre-Marie Pédrot <pierre-marie.pedrot@inria.fr>2016-06-01 19:16:52 +0200
committerGravatar Pierre-Marie Pédrot <pierre-marie.pedrot@inria.fr>2016-06-01 19:37:41 +0200
commitcf5baeccf3cf7c24ccc69aa728bfe836fba5230a (patch)
tree4e530c6ef169bd61bab7f30098d544947e8d7431 /plugins/micromega
parentad66acf99a85cf1dee3bb56f70121130c090b0c4 (diff)
parent4c66c7f9c370d2088dfa064e77f45b869c672e98 (diff)
Merge branch 'v8.5'
Diffstat (limited to 'plugins/micromega')
-rw-r--r--plugins/micromega/persistent_cache.ml8
1 files changed, 5 insertions, 3 deletions
diff --git a/plugins/micromega/persistent_cache.ml b/plugins/micromega/persistent_cache.ml
index 6a03e2d61..88b13abf9 100644
--- a/plugins/micromega/persistent_cache.ml
+++ b/plugins/micromega/persistent_cache.ml
@@ -212,9 +212,11 @@ let find t k =
res
let memo cache f =
- let tbl = lazy (open_in cache) in
- fun x ->
- let tbl = Lazy.force tbl in
+ let tbl = lazy (try Some (open_in cache) with _ -> None) in
+ fun x ->
+ match Lazy.force tbl with
+ | None -> f x
+ | Some tbl ->
try
find tbl x
with