diff options
Diffstat (limited to 'haddock-api/src/Haddock/Interface')
| -rw-r--r-- | haddock-api/src/Haddock/Interface/Create.hs | 5 | ||||
| -rw-r--r-- | haddock-api/src/Haddock/Interface/Rename.hs | 5 | 
2 files changed, 7 insertions, 3 deletions
| diff --git a/haddock-api/src/Haddock/Interface/Create.hs b/haddock-api/src/Haddock/Interface/Create.hs index 2c8b0b7e..2cdc6f8b 100644 --- a/haddock-api/src/Haddock/Interface/Create.hs +++ b/haddock-api/src/Haddock/Interface/Create.hs @@ -349,8 +349,9 @@ subordinates instMap decl = case decl of                    , L _ (ConDeclField ns _ doc) <- (unLoc flds)                    , L _ n <- ns ]          derivs  = [ (instName, [unL doc], M.empty) -                  | Just (L _ tys) <- [dd_derivs dd] -                  , HsIB { hsib_body = L l (HsDocTy _ doc) } <- tys +                  | HsIB { hsib_body = L l (HsDocTy _ doc) } +                      <- concatMap (unLoc . deriv_clause_tys . unLoc) $ +                           unLoc $ dd_derivs dd                    , Just instName <- [M.lookup l instMap] ]  -- | Extract function argument docs from inside types. diff --git a/haddock-api/src/Haddock/Interface/Rename.hs b/haddock-api/src/Haddock/Interface/Rename.hs index cf3b72ac..fa85ba64 100644 --- a/haddock-api/src/Haddock/Interface/Rename.hs +++ b/haddock-api/src/Haddock/Interface/Rename.hs @@ -416,7 +416,8 @@ renameDataDefn (HsDataDefn { dd_ND = nd, dd_ctxt = lcontext, dd_cType = cType      cons'     <- mapM (mapM renameCon) cons      -- I don't think we need the derivings, so we return Nothing      return (HsDataDefn { dd_ND = nd, dd_ctxt = lcontext', dd_cType = cType -                       , dd_kindSig = k', dd_cons = cons', dd_derivs = Nothing }) +                       , dd_kindSig = k', dd_cons = cons' +                       , dd_derivs = noLoc [] })  renameCon :: ConDecl Name -> RnM (ConDecl DocName)  renameCon decl@(ConDeclH98 { con_name = lname, con_qvars = ltyvars @@ -509,9 +510,11 @@ renameInstD (DataFamInstD { dfid_inst = d }) = do  renameDerivD :: DerivDecl Name -> RnM (DerivDecl DocName)  renameDerivD (DerivDecl { deriv_type = ty +                        , deriv_strategy = strat                          , deriv_overlap_mode = omode }) = do    ty' <- renameLSigType ty    return (DerivDecl { deriv_type = ty' +                    , deriv_strategy = strat                      , deriv_overlap_mode = omode })  renameClsInstD :: ClsInstDecl Name -> RnM (ClsInstDecl DocName) | 
