diff options
author | Alan Zimmerman <alan.zimm@gmail.com> | 2021-02-22 20:04:24 +0000 |
---|---|---|
committer | Alan Zimmerman <alan.zimm@gmail.com> | 2021-02-22 20:04:24 +0000 |
commit | 8241d9e700e043b86b609c334494c4632848389f (patch) | |
tree | 58cc739b2a3f9aa70c344a8c98994bd6c8b03172 /haddock-api/src/Haddock/Interface/Rename.hs | |
parent | d1b7f181b60ba3ac191183f1512e66793d28ac08 (diff) |
Context becomes a Maybe in the GHC AST
This prevents noLoc's appearing in the ParsedSource.
Match the change in GHC.
Diffstat (limited to 'haddock-api/src/Haddock/Interface/Rename.hs')
-rw-r--r-- | haddock-api/src/Haddock/Interface/Rename.hs | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/haddock-api/src/Haddock/Interface/Rename.hs b/haddock-api/src/Haddock/Interface/Rename.hs index b212adce..b62f79ce 100644 --- a/haddock-api/src/Haddock/Interface/Rename.hs +++ b/haddock-api/src/Haddock/Interface/Rename.hs @@ -258,7 +258,7 @@ renameType t = case t of , hst_tele = tele', hst_body = ltype' }) HsQualTy { hst_ctxt = lcontext , hst_body = ltype } -> do - lcontext' <- renameLContext lcontext + lcontext' <- traverse renameLContext lcontext ltype' <- renameLType ltype return (HsQualTy { hst_xqual = noExtField, hst_ctxt = lcontext', hst_body = ltype' }) @@ -432,7 +432,7 @@ renameTyClD d = case d of ClassDecl { tcdCtxt = lcontext, tcdLName = lname, tcdTyVars = ltyvars, tcdFixity = fixity , tcdFDs = lfundeps, tcdSigs = lsigs, tcdATs = ats, tcdATDefs = at_defs } -> do - lcontext' <- renameLContext lcontext + lcontext' <- traverse renameLContext lcontext lname' <- renameL lname ltyvars' <- renameLHsQTyVars ltyvars lfundeps' <- mapM renameLFunDep lfundeps @@ -490,7 +490,7 @@ renameFamilyInfo (ClosedTypeFamily eqns) renameDataDefn :: HsDataDefn GhcRn -> RnM (HsDataDefn DocNameI) renameDataDefn (HsDataDefn { dd_ND = nd, dd_ctxt = lcontext, dd_cType = cType , dd_kindSig = k, dd_cons = cons }) = do - lcontext' <- renameLContext lcontext + lcontext' <- traverse renameLContext lcontext k' <- renameMaybeLKind k cons' <- mapM (mapM renameCon) cons -- I don't think we need the derivings, so we return Nothing |