aboutsummaryrefslogtreecommitdiff
path: root/src/Haddock/Backends/Xhtml
diff options
context:
space:
mode:
authorHenning Thielemann <git@henning-thielemann.de>2012-04-01 13:03:07 +0200
committerHenning Thielemann <git@henning-thielemann.de>2012-04-01 13:03:07 +0200
commita2bcbcffde1e78a6031132bdf4a1a605978352a8 (patch)
tree6cc2d15c8946d0176fec784d31c87c7ed4c27135 /src/Haddock/Backends/Xhtml
parentbc89bcc2b076c13ad559543ebba43603c8ab990c (diff)
add QualOption type for distinction between qualification argument given by the user
and the actual qualification for a concrete module
Diffstat (limited to 'src/Haddock/Backends/Xhtml')
-rw-r--r--src/Haddock/Backends/Xhtml/Names.hs8
1 files changed, 2 insertions, 6 deletions
diff --git a/src/Haddock/Backends/Xhtml/Names.hs b/src/Haddock/Backends/Xhtml/Names.hs
index 274078a6..9963fffc 100644
--- a/src/Haddock/Backends/Xhtml/Names.hs
+++ b/src/Haddock/Backends/Xhtml/Names.hs
@@ -64,14 +64,10 @@ ppQualifyName qual name mdl =
case qual of
NoQual -> ppName name
FullQual -> ppFullQualName mdl name
- -- this is just in case, it should never happen
- LocalQual Nothing -> ppQualifyName FullQual name mdl
- LocalQual (Just localmdl)
+ LocalQual localmdl
| moduleString mdl == moduleString localmdl -> ppName name
| otherwise -> ppFullQualName mdl name
- -- again, this never happens
- RelativeQual Nothing -> ppQualifyName FullQual name mdl
- RelativeQual (Just localmdl) ->
+ RelativeQual localmdl ->
case List.stripPrefix (moduleString localmdl) (moduleString mdl) of
-- local, A.x -> x
Just [] -> ppQualifyName NoQual name mdl