]> matita.cs.unibo.it Git - helm.git/commitdiff
Several "try ... with _ -> " specialized.
authorClaudio Sacerdoti Coen <claudio.sacerdoticoen@unibo.it>
Mon, 27 Mar 2006 12:21:48 +0000 (12:21 +0000)
committerClaudio Sacerdoti Coen <claudio.sacerdoticoen@unibo.it>
Mon, 27 Mar 2006 12:21:48 +0000 (12:21 +0000)
components/cic_proof_checking/cicPp.ml
components/cic_proof_checking/cicReduction.ml
components/cic_proof_checking/cicTypeChecker.ml

index 954134584b69db831d0d060cc0ed2bd301b4bdb0..2a7a3f2d02f4f26c35356a12d182e95b2e3fed0a 100644 (file)
@@ -119,7 +119,8 @@ let rec pp t l =
               name ^ pp_exp_named_subst exp_named_subst l
           | _ -> raise CicPpInternalError
         with
-         _ -> UriManager.string_of_uri uri ^ "#1/" ^ string_of_int (n + 1)
+           Sys.Break as exn -> raise exn
+         | _ -> UriManager.string_of_uri uri ^ "#1/" ^ string_of_int (n + 1)
        )
     | C.MutConstruct (uri,n1,n2,exp_named_subst) ->
        (try
@@ -130,7 +131,8 @@ let rec pp t l =
                id ^ pp_exp_named_subst exp_named_subst l
           | _ -> raise CicPpInternalError
         with
-         _ ->
+           Sys.Break as exn -> raise exn
+         | _ ->
           UriManager.string_of_uri uri ^ "#1/" ^ string_of_int (n1 + 1) ^ "/" ^
            string_of_int n2
        )
index 046ab908ab1b66a20f2291ddb5837ba1b3ae9900..18259a00441873ea85ea755e3a06e891de291872 100644 (file)
@@ -357,7 +357,7 @@ module Reduction(RS : Strategy) =
            let d =
             try
              Some (RS.from_env_for_unwind ~unwind (List.nth e (n-m-1)))
-            with _ -> None
+            with Failure _ -> None
            in
             (match d with 
                 Some t' ->
@@ -682,7 +682,7 @@ if List.mem uri params then debug_print (lazy "---- OK2") ;
           try
            Some (RS.from_stack (List.nth s recindex))
           with
-           _ -> None
+           Failure _ -> None
          in
           (match recparam with
               Some recparam ->
index 951f68dbd84b28043a100fe3c72c114d4f5927a7..c4b7f8cbf6f8a521c8f1d7fc3682b0a3aecfd39b 100644 (file)
@@ -1472,7 +1472,7 @@ and type_of_aux' ~logger ?(subst = []) metasenv context t ugraph =
           | None -> raise 
              (TypeCheckerFailure (lazy "Reference to deleted hypothesis"))
         with
-        _ ->
+        Failure _ ->
           raise (TypeCheckerFailure (lazy "unbound variable"))
        )
     | C.Var (uri,exp_named_subst) ->