aboutsummaryrefslogtreecommitdiff
path: root/src/Haddock/Interface
diff options
context:
space:
mode:
authorSimon Peyton Jones <simonpj@microsoft.com>2013-03-15 14:16:10 +0000
committerSimon Peyton Jones <simonpj@microsoft.com>2013-03-15 14:16:10 +0000
commitb6ef14069677c79f85cfdce7b5d69b06ca35f8b5 (patch)
tree84f91eb1b9419de5fc0d23a2b4253f66fe0e8508 /src/Haddock/Interface
parent478b606bb0d61c4fea2d72171e2e5bb881a366d2 (diff)
Adapt to tcRnGetInfo returning family instances too
This API change was part of the fix to Trac #4175. But it offers new information to Haddock: the type-family instances, as well as the class instances, of this type. This patch just drops the new information on the floor, but there's an open opportunity to use it in the information that Haddock displays.
Diffstat (limited to 'src/Haddock/Interface')
-rw-r--r--src/Haddock/Interface/AttachInstances.hs6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/Haddock/Interface/AttachInstances.hs b/src/Haddock/Interface/AttachInstances.hs
index f4107c63..62d08021 100644
--- a/src/Haddock/Interface/AttachInstances.hs
+++ b/src/Haddock/Interface/AttachInstances.hs
@@ -64,14 +64,14 @@ attachToExportItem expInfo iface ifaceMap instIfaceMap export =
export {
expItemInstances =
case mb_info of
- Just (_, _, instances) ->
+ Just (_, _, cls_instances, _fam_instances) ->
{-
let insts = map (first synifyInstHead) $ sortImage (first instHead)
[ (instanceSig i, getName i) | i <- instances ]
-}
let insts = map (first synifyInstHead) $ sortImage (first instHead) $
filter (\((_,_,cls,tys),_) -> not $ isInstanceHidden expInfo cls tys)
- [ (instanceHead' i, getName i) | i <- instances ]
+ [ (instanceHead' i, getName i) | i <- cls_instances ]
in [ (inst, lookupInstDoc name iface ifaceMap instIfaceMap)
| (inst, name) <- insts ]
Nothing -> []
@@ -116,7 +116,7 @@ dropSilentArgs dfun theta = drop (dfunNSilent dfun) theta
-- | Like GHC's getInfo but doesn't cut things out depending on the
-- interative context, which we don't set sufficiently anyway.
-getAllInfo :: GhcMonad m => Name -> m (Maybe (TyThing,Fixity,[ClsInst]))
+getAllInfo :: GhcMonad m => Name -> m (Maybe (TyThing,Fixity,[ClsInst],[FamInst Branched]))
getAllInfo name = withSession $ \hsc_env -> do
(_msgs, r) <- liftIO $ tcRnGetInfo hsc_env name
return r