diff options
author | David Waern <david.waern@gmail.com> | 2012-04-01 21:26:13 +0200 |
---|---|---|
committer | David Waern <david.waern@gmail.com> | 2012-04-01 21:26:13 +0200 |
commit | 7569db9bae4e70416b960d54d145312e0b8747a2 (patch) | |
tree | 2bb27dfe0e40b2e09e5bbe9126b881bd27620419 /src/Haddock/Backends/Xhtml/Names.hs | |
parent | 7e3eb8d3aa0d5ff2caa62bde637d8c577b72f92d (diff) | |
parent | 29861370dd56f59557c3bcecd53fba0f88a89792 (diff) |
Merge http://code.haskell.org/~thielema/haddock/ into ghc-7.4
Diffstat (limited to 'src/Haddock/Backends/Xhtml/Names.hs')
-rw-r--r-- | src/Haddock/Backends/Xhtml/Names.hs | 8 |
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 |