From 1707245588f08b3ea6f4335271deef468ca7a930 Mon Sep 17 00:00:00 2001 From: pboutill Date: Sun, 5 Aug 2012 23:13:07 +0000 Subject: More entries in the index Patch by Adam Chilipala. git-svn-id: svn+ssh://scm.gforge.inria.fr/svn/coq/trunk@15678 85f007b7-540e-0410-9357-904b9bb8a0f7 --- tools/coqdoc/index.ml | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) (limited to 'tools') diff --git a/tools/coqdoc/index.ml b/tools/coqdoc/index.ml index f19433e952..aaf0601264 100644 --- a/tools/coqdoc/index.ml +++ b/tools/coqdoc/index.ml @@ -359,7 +359,16 @@ let read_glob vfile f = Scanf.sscanf s "R%d:%d %s %s %s %s" (fun loc1 loc2 lib_dp sp id ty -> 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