aboutsummaryrefslogtreecommitdiff
path: root/src/Main.hs
diff options
context:
space:
mode:
authorDuncan Coutts <duncan.coutts@worc.ox.ac.uk>2006-01-22 00:02:00 +0000
committerDuncan Coutts <duncan.coutts@worc.ox.ac.uk>2006-01-22 00:02:00 +0000
commitedd9f2295507bce2247108a4d5a0d991f15fd250 (patch)
treedc757d5629d7347643f47121070e4ff0e5e92d0d /src/Main.hs
parent43bb89fa9667162f3f4a0e024a3f926696c173b9 (diff)
Extend URL variable expansion syntax and add source links to the contents page
Like the wiki link on the contents and index page, add a source code link too. Extend the wiki & source URL variable expansion syntax. The original syntax was: %F for the source file name (the .hs version only, not the .lhs or .hs.pp one) %M for the module name (with '.' replaced by '/') The new syntax is: %F or %{FILE} for the original source file name %M or %{MODULE} for the module name (no replacements) %N or %{NAME} for the function/type export name %K or %{KIND} for a type/value flag "t" or "v" with these extensions: %{MODULE/./c} to replace the '.' module seperator with any other char c %{VAR|some text with the % char in it} which means if the VAR is not in use in this URL context then "" else replace the given text with the '%' char replaced by the string value of the VAR. This extension allows us to construct URLs wit optional parts, since the module/file name is not available for the URL in the contents/index pages and the value/type name is not available for the URL at the top level of each module.
Diffstat (limited to 'src/Main.hs')
-rw-r--r--src/Main.hs6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/Main.hs b/src/Main.hs
index 1f76fe47..491eeccf 100644
--- a/src/Main.hs
+++ b/src/Main.hs
@@ -236,12 +236,14 @@ run flags files = do
when (Flag_GenContents `elem` flags) $ do
ppHtmlContents odir title package maybe_html_help_format
- maybe_index_url maybe_wiki_url visible_read_ifaces prologue
+ maybe_index_url maybe_source_url maybe_wiki_url
+ visible_read_ifaces prologue
copyHtmlBits odir libdir css_file
when (Flag_GenIndex `elem` flags) $ do
ppHtmlIndex odir title package maybe_html_help_format
- maybe_contents_url maybe_wiki_url visible_read_ifaces
+ maybe_contents_url maybe_source_url maybe_wiki_url
+ visible_read_ifaces
copyHtmlBits odir libdir css_file
when (Flag_GenContents `elem` flags && Flag_GenIndex `elem` flags) $ do