aboutsummaryrefslogtreecommitdiff
path: root/haddock-api/src/Haddock/Utils.hs
diff options
context:
space:
mode:
authorŁukasz Hanuszczak <lukasz.hanuszczak@gmail.com>2015-06-26 22:41:07 +0200
committerŁukasz Hanuszczak <lukasz.hanuszczak@gmail.com>2015-06-30 22:37:49 +0200
commitd58bcf24dfa4333e7893935eb86c036be28125b1 (patch)
tree68a5c247d4944329041e97a07ebada46be3110b2 /haddock-api/src/Haddock/Utils.hs
parent844c09d0c1d724e0f0f0698654f2f85f5f58be19 (diff)
Make external hyperlinks point to locations specified by source URLs.
Diffstat (limited to 'haddock-api/src/Haddock/Utils.hs')
-rw-r--r--haddock-api/src/Haddock/Utils.hs5
1 files changed, 4 insertions, 1 deletions
diff --git a/haddock-api/src/Haddock/Utils.hs b/haddock-api/src/Haddock/Utils.hs
index 78c78aca..047d9fd0 100644
--- a/haddock-api/src/Haddock/Utils.hs
+++ b/haddock-api/src/Haddock/Utils.hs
@@ -29,7 +29,7 @@ module Haddock.Utils (
moduleNameUrl, moduleNameUrl', moduleUrl,
nameAnchorId,
makeAnchorId,
- defaultModuleSourceUrl,
+ defaultModuleSourceUrl, defaultNameSourceUrl,
-- * Miscellaneous utilities
getProgramName, bye, die, dieMsg, noDieMsg, mapSnd, mapMaybeM, escapeStr,
@@ -281,6 +281,9 @@ makeAnchorId (f:r) = escape isAlpha f ++ concatMap (escape isLegal) r
defaultModuleSourceUrl :: String
defaultModuleSourceUrl = "src/%{MODULE}.html"
+defaultNameSourceUrl :: String
+defaultNameSourceUrl = defaultModuleSourceUrl ++ "#%{NAME}"
+
-------------------------------------------------------------------------------
-- * Files we need to copy from our $libdir