diff options
| author | letouzey | 2013-03-13 00:00:25 +0000 |
|---|---|---|
| committer | letouzey | 2013-03-13 00:00:25 +0000 |
| commit | 6d378686e7986a391130b98019c7c52de27c42e7 (patch) | |
| tree | 335e6fbbf484c8e19b3a1e1461b93c5632256315 /plugins/extraction/haskell.ml | |
| parent | 9aecb4427f0f8ca3cb4c26bc7f73bb74164a93d9 (diff) | |
Restrict (try...with...) to avoid catching critical exn (part 9)
git-svn-id: svn+ssh://scm.gforge.inria.fr/svn/coq/trunk@16285 85f007b7-540e-0410-9357-904b9bb8a0f7
Diffstat (limited to 'plugins/extraction/haskell.ml')
| -rw-r--r-- | plugins/extraction/haskell.ml | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/plugins/extraction/haskell.ml b/plugins/extraction/haskell.ml index 3925a2a2f4..59dd5596e7 100644 --- a/plugins/extraction/haskell.ml +++ b/plugins/extraction/haskell.ml @@ -86,7 +86,9 @@ let pp_global k r = let rec pp_type par vl t = let rec pp_rec par = function | Tmeta _ | Tvar' _ -> assert false - | Tvar i -> (try pr_id (List.nth vl (pred i)) with _ -> (str "a" ++ int i)) + | Tvar i -> + (try pr_id (List.nth vl (pred i)) + with Failure _ -> (str "a" ++ int i)) | Tglob (r,[]) -> pp_global Type r | Tglob (IndRef(kn,0),l) when not (keep_singleton ()) && kn = mk_ind "Coq.Init.Specif" "sig" -> |
