diff options
Diffstat (limited to 'src/Haddock/Interface')
| -rw-r--r-- | src/Haddock/Interface/AttachInstances.hs | 2 | ||||
| -rw-r--r-- | src/Haddock/Interface/Rename.hs | 13 | 
2 files changed, 8 insertions, 7 deletions
| diff --git a/src/Haddock/Interface/AttachInstances.hs b/src/Haddock/Interface/AttachInstances.hs index d43213c8..e3acc6cf 100644 --- a/src/Haddock/Interface/AttachInstances.hs +++ b/src/Haddock/Interface/AttachInstances.hs @@ -133,7 +133,7 @@ toHsType t = case t of    TyConApp tc ts -> case ts of       t1:t2:rest -      | isNameConSym . tyConName $ tc -> +      | isSymOcc . nameOccName . tyConName $ tc ->            app (HsOpTy (toLHsType t1) (noLoc . tyConName $ tc) (toLHsType t2)) rest      _ -> app (tycon tc) ts diff --git a/src/Haddock/Interface/Rename.hs b/src/Haddock/Interface/Rename.hs index 947c3b29..11a0a14c 100644 --- a/src/Haddock/Interface/Rename.hs +++ b/src/Haddock/Interface/Rename.hs @@ -8,6 +8,7 @@  module Haddock.Interface.Rename (renameInterface) where +import Haddock.DocName  import Haddock.Types  import Haddock.GHC.Utils @@ -35,7 +36,7 @@ renameInterface renamingEnv mod =    -- is mapped to itself, and everything else comes from the global renaming    -- env    let localEnv = foldl fn renamingEnv (ifaceVisibleExports mod) -        where fn env name = Map.insert name (nameSetMod name (ifaceMod mod)) env +        where fn env name = Map.insert name (ifaceMod mod) env        docs = Map.toList (ifaceDocMap mod)        renameMapElem (k,d) = do d' <- renameDoc d; return (k, d')  @@ -119,8 +120,8 @@ runRnFM :: LinkEnv -> RnM a -> (a,[Name])  runRnFM env rn = unRn rn lkp     where       lkp n = case Map.lookup n env of -      Nothing -> (False, NoLink n)  -      Just q  -> (True, Link q) +      Nothing  -> (False, Undocumented n)  +      Just mod -> (True,  Documented n mod)  -------------------------------------------------------------------------------- @@ -128,8 +129,8 @@ runRnFM env rn = unRn rn lkp  -------------------------------------------------------------------------------- -keep n = NoLink n -keepL (L loc n) = L loc (NoLink n) +keep n = Undocumented n +keepL (L loc n) = L loc (Undocumented n)  rename = lookupRn id  @@ -162,7 +163,7 @@ renameDoc doc = case doc of      lkp <- getLookupRn      case [ n | (True, n) <- map lkp ids ] of        ids'@(_:_) -> return (DocIdentifier ids') -      [] -> return (DocIdentifier (map NoLink ids)) +      [] -> return (DocIdentifier (map Undocumented ids))    DocModule str -> return (DocModule str)    DocEmphasis doc -> do      doc' <- renameDoc doc | 
