aboutsummaryrefslogtreecommitdiffhomepage
path: root/plugins/extraction/modutil.ml
diff options
context:
space:
mode:
authorGravatar letouzey <letouzey@85f007b7-540e-0410-9357-904b9bb8a0f7>2010-07-15 09:26:00 +0000
committerGravatar letouzey <letouzey@85f007b7-540e-0410-9357-904b9bb8a0f7>2010-07-15 09:26:00 +0000
commitb0d9678f24255554e763da3e594868da72e858b6 (patch)
tree7802ff0f3e635e98eecb347ab0cb68a0babf786d /plugins/extraction/modutil.ml
parent389501486745e0cc3651e05e62d8ddd0d0e1780e (diff)
Extraction: fix a bit the extraction under modules
Extraction under modules is highly experimental, and just work a bit. Don't expect too much of it. With this commit, I simply avoid a few "assert false" to occur when we are under modules. But things are still quite wrong, for instance with: Definition foo. Module M. Definition bar := foo. Recursive Extraction bar. Extraction of bar is ok, but foo isn't displayed, since extraction can't get it: Lib.contents_after doesn't mention it, it is probably in some frozen summary. git-svn-id: svn+ssh://scm.gforge.inria.fr/svn/coq/trunk@13281 85f007b7-540e-0410-9357-904b9bb8a0f7
Diffstat (limited to 'plugins/extraction/modutil.ml')
-rw-r--r--plugins/extraction/modutil.ml5
1 files changed, 3 insertions, 2 deletions
diff --git a/plugins/extraction/modutil.ml b/plugins/extraction/modutil.ml
index 4ed6e9a08..8bc98e452 100644
--- a/plugins/extraction/modutil.ml
+++ b/plugins/extraction/modutil.ml
@@ -185,7 +185,7 @@ let signature_of_structure s =
(*s Searching one [ml_decl] in a [ml_structure] by its [global_reference] *)
let get_decl_in_structure r struc =
- try
+ try
let base_mp,ll = labels_of_ref r in
if not (at_toplevel base_mp) then error_not_visible r;
let sel = List.assoc base_mp struc in
@@ -200,7 +200,8 @@ let get_decl_in_structure r struc =
| MEstruct (_,sel) -> go ll sel
| _ -> error_not_visible r
in go ll sel
- with Not_found -> assert false
+ with Not_found ->
+ anomaly "reference not found in extracted structure"
(*s Optimization of a [ml_structure]. *)