From 9aecb4427f0f8ca3cb4c26bc7f73bb74164a93d9 Mon Sep 17 00:00:00 2001 From: letouzey Date: Wed, 13 Mar 2013 00:00:17 +0000 Subject: Restrict (try...with...) to avoid catching critical exn (part 8) git-svn-id: svn+ssh://scm.gforge.inria.fr/svn/coq/trunk@16284 85f007b7-540e-0410-9357-904b9bb8a0f7 --- kernel/nativecode.ml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'kernel/nativecode.ml') diff --git a/kernel/nativecode.ml b/kernel/nativecode.ml index aeb5412e44..34f26086af 100644 --- a/kernel/nativecode.ml +++ b/kernel/nativecode.ml @@ -782,7 +782,7 @@ let subst s l = else let rec aux l = match l with - | MLlocal id -> (try LNmap.find id s with _ -> l) + | MLlocal id -> (try LNmap.find id s with Not_found -> l) | MLglobal _ | MLprimitive _ | MLint _ -> l | MLlam(params,body) -> MLlam(params, aux body) | MLletrec(defs,body) -> @@ -851,7 +851,7 @@ let commutative_cut annot a accu bs args = let optimize gdef l = let rec optimize s l = match l with - | MLlocal id -> (try LNmap.find id s with _ -> l) + | MLlocal id -> (try LNmap.find id s with Not_found -> l) | MLglobal _ | MLprimitive _ | MLint _ -> l | MLlam(params,body) -> MLlam(params, optimize s body) -- cgit v1.2.3