diff options
author | letouzey <letouzey@85f007b7-540e-0410-9357-904b9bb8a0f7> | 2003-01-28 23:48:04 +0000 |
---|---|---|
committer | letouzey <letouzey@85f007b7-540e-0410-9357-904b9bb8a0f7> | 2003-01-28 23:48:04 +0000 |
commit | cf2109c4015f4c444e33b9b2f264cf415341ef39 (patch) | |
tree | 30ea97cf5cd56923141bacc31125446c2599baa8 /contrib | |
parent | bac429d2e3809fe14bf7422eb9fabceb13de87ff (diff) |
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
Diffstat (limited to 'contrib')
-rw-r--r-- | contrib/extraction/common.ml | 18 |
1 files changed, 12 insertions, 6 deletions
diff --git a/contrib/extraction/common.ml b/contrib/extraction/common.ml index 0f07658fb..720877459 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 |