From cf2109c4015f4c444e33b9b2f264cf415341ef39 Mon Sep 17 00:00:00 2001 From: letouzey Date: Tue, 28 Jan 2003 23:48:04 +0000 Subject: workaround en attendant traitement reel des modules types git-svn-id: svn+ssh://scm.gforge.inria.fr/svn/coq/trunk@3618 85f007b7-540e-0410-9357-904b9bb8a0f7 --- contrib/extraction/common.ml | 18 ++++++++++++------ 1 file changed, 12 insertions(+), 6 deletions(-) diff --git a/contrib/extraction/common.ml b/contrib/extraction/common.ml index 0f07658fb7..7208774591 100644 --- a/contrib/extraction/common.ml +++ b/contrib/extraction/common.ml @@ -117,9 +117,12 @@ let contents_first_level mp = mib.mind_packets | _ -> () in - match (Environ.lookup_module mp !cur_env).mod_expr with - | Some (MEBstruct (_,msb)) -> List.iter contents_seb msb; (mp,!s) - | _ -> mp,!s + try + let m = Environ.lookup_module mp !cur_env in + match m.mod_expr with + | Some (MEBstruct (_,msb)) -> List.iter contents_seb msb; (mp,!s) + | _ -> mp,!s + with Not_found -> mp,!s let modules_first_level mp = let s = ref Stringset.empty in @@ -128,9 +131,12 @@ let modules_first_level mp = | (l, (SEBmodule _ | SEBmodtype _)) -> add (id_of_label l) | _ -> () in - match (Environ.lookup_module mp !cur_env).mod_expr with - | Some (MEBstruct (_,msb)) -> List.iter contents_seb msb; !s - | _ -> !s + try + let m = Environ.lookup_module mp !cur_env in + match m.mod_expr with + | Some (MEBstruct (_,msb)) -> List.iter contents_seb msb; !s + | _ -> !s + with Not_found -> !s let contents_first_level = let cache = ref MPmap.empty in -- cgit v1.2.3