From e0d682ec25282a348d35c5b169abafec48555690 Mon Sep 17 00:00:00 2001 From: Stephane Glondu Date: Mon, 20 Aug 2012 18:27:01 +0200 Subject: Imported Upstream version 8.4dfsg --- tools/coqdoc/index.ml | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) (limited to 'tools/coqdoc/index.ml') diff --git a/tools/coqdoc/index.ml b/tools/coqdoc/index.ml index f19433e9..d319ce72 100644 --- a/tools/coqdoc/index.ml +++ b/tools/coqdoc/index.ml @@ -1,6 +1,6 @@ (************************************************************************) (* v * The Coq Proof Assistant / The Coq Development Team *) -(* for loc=loc1 to loc2 do - add_ref !cur_mod loc lib_dp sp id (type_of_string ty) + add_ref !cur_mod loc lib_dp sp id (type_of_string ty); + + (* Also add an entry for each module mentioned in [lib_dp], + * to use in interpolation. *) + ignore (List.fold_right (fun thisPiece priorPieces -> + let newPieces = match priorPieces with + | "" -> thisPiece + | _ -> thisPiece ^ "." ^ priorPieces in + add_ref !cur_mod loc "" "" newPieces Library; + newPieces) (Str.split (Str.regexp_string ".") lib_dp) "") done) with _ -> ()) | _ -> -- cgit v1.2.3