diff options
author | notin <notin@85f007b7-540e-0410-9357-904b9bb8a0f7> | 2006-05-26 10:33:21 +0000 |
---|---|---|
committer | notin <notin@85f007b7-540e-0410-9357-904b9bb8a0f7> | 2006-05-26 10:33:21 +0000 |
commit | 3d8d02a1980ec80e322cdabb6ac035d365c513bf (patch) | |
tree | f2748f20433c49f11f438009c626c9ffba9d26c3 /tools/coqdoc/output.ml | |
parent | e53df7b8ea4542f84fd85dafc667511cc1252bc3 (diff) |
Support des modules dans Coqdoc
git-svn-id: svn+ssh://scm.gforge.inria.fr/svn/coq/trunk@8863 85f007b7-540e-0410-9357-904b9bb8a0f7
Diffstat (limited to 'tools/coqdoc/output.ml')
-rw-r--r-- | tools/coqdoc/output.ml | 32 |
1 files changed, 17 insertions, 15 deletions
diff --git a/tools/coqdoc/output.ml b/tools/coqdoc/output.ml index ddba3c509..79bcc9715 100644 --- a/tools/coqdoc/output.ml +++ b/tools/coqdoc/output.ml @@ -336,12 +336,12 @@ module Html = struct raw_ident s i*) - let ident_ref m s = match find_module m with + let ident_ref m fid s = match find_module m with | Local -> - printf "<a class=\"idref\" href=\"%s.html#%s\">" m s; raw_ident s; printf "</a>" + printf "<a class=\"idref\" href=\"%s.html#%s\">" m fid; raw_ident s; printf "</a>" | Coqlib when !externals -> let m = Filename.concat !coqlib m in - printf "<a class=\"idref\" href=\"%s.html#%s\">" m s; raw_ident s; printf "</a>" + printf "<a class=\"idref\" href=\"%s.html#%s\">" m fid; raw_ident s; printf "</a>" | Coqlib | Unknown -> raw_ident s @@ -351,18 +351,20 @@ module Html = struct raw_ident s; printf "</span>" end else - try - (match Index.find !current_module loc with - | Def _ -> - printf "<a name=\"%s\"></a>" s; raw_ident s - | Mod (m,s') when s = s' -> - module_ref m s - | Ref (m,s') when s = s' -> - ident_ref m s - | Mod _ | Ref _ -> - raw_ident s) - with Not_found -> - raw_ident s + begin + try + (match Index.find !current_module loc with + | Def (fullid,_) -> + printf "<a name=\"%s\"></a>" fullid; raw_ident s + | Mod (m,s') when s = s' -> + module_ref m s + | Ref (m,fullid) -> + ident_ref m fullid s + | Mod _ | Ref _ -> + raw_ident s) + with Not_found -> + raw_ident s + end let with_html_printing f tok = try |