aboutsummaryrefslogtreecommitdiff
path: root/src/Haddock/Backends/Xhtml/Utils.hs
diff options
context:
space:
mode:
authorIan Lynagh <igloo@earth.li>2011-06-17 19:10:29 +0100
committerIan Lynagh <igloo@earth.li>2011-06-17 19:10:29 +0100
commit8739a6bd59f562bb550c915f1d2b2a327b748572 (patch)
tree6ce78264c2b2e1103209c70f3560b816f884937e /src/Haddock/Backends/Xhtml/Utils.hs
parentab24835eadb99059934d7a14f86564eea6449257 (diff)
Fix build
Diffstat (limited to 'src/Haddock/Backends/Xhtml/Utils.hs')
-rw-r--r--src/Haddock/Backends/Xhtml/Utils.hs9
1 files changed, 7 insertions, 2 deletions
diff --git a/src/Haddock/Backends/Xhtml/Utils.hs b/src/Haddock/Backends/Xhtml/Utils.hs
index c250f5eb..7ba6d5f4 100644
--- a/src/Haddock/Backends/Xhtml/Utils.hs
+++ b/src/Haddock/Backends/Xhtml/Utils.hs
@@ -37,7 +37,7 @@ import Data.Maybe
import Text.XHtml hiding ( name, title, p, quote )
import qualified Text.XHtml as XHtml
-import GHC ( SrcSpan, srcSpanStartLine, Name )
+import GHC ( SrcSpan(..), srcSpanStartLine, Name )
import Module ( Module )
import Name ( getOccString, nameOccName, isValOcc )
@@ -59,7 +59,12 @@ spliceURL maybe_file maybe_mod maybe_name maybe_loc url = run url
line = case maybe_loc of
Nothing -> ""
- Just span_ -> show $ srcSpanStartLine span_
+ Just span_ ->
+ case span_ of
+ RealSrcSpan span__ ->
+ show $ srcSpanStartLine span__
+ UnhelpfulSpan _ ->
+ error "spliceURL UnhelpfulSpan"
run "" = ""
run ('%':'M':rest) = mdl ++ run rest