diff options
author | Alan Zimmerman <alan.zimm@gmail.com> | 2021-02-21 21:16:24 +0000 |
---|---|---|
committer | Marge Bot <ben+marge-bot@smart-cactus.org> | 2021-03-01 17:32:12 -0500 |
commit | ce85cffc7c3afa55755ae8d1aa027761bf54bed4 (patch) | |
tree | 81986b7475f28a20bb80301107f9360a90b1e976 /compiler/GHC/Rename/Module.hs | |
parent | 6429943b0a377e076bcfd26c79ceb27cf2f4a9ab (diff) | |
download | haskell-ce85cffc7c3afa55755ae8d1aa027761bf54bed4.tar.gz |
Wrap LHsContext in Maybe in the GHC AST
If the context is missing it is captured as Nothing, rather than
putting a noLoc in the ParsedSource.
Updates haddock submodule
Diffstat (limited to 'compiler/GHC/Rename/Module.hs')
-rw-r--r-- | compiler/GHC/Rename/Module.hs | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/compiler/GHC/Rename/Module.hs b/compiler/GHC/Rename/Module.hs index 622432bf4d..667c5d0eff 100644 --- a/compiler/GHC/Rename/Module.hs +++ b/compiler/GHC/Rename/Module.hs @@ -1897,7 +1897,7 @@ rnDataDefn :: HsDocContext -> HsDataDefn GhcPs rnDataDefn doc (HsDataDefn { dd_ND = new_or_data, dd_cType = cType , dd_ctxt = context, dd_cons = condecls , dd_kindSig = m_sig, dd_derivs = derivs }) - = do { checkTc (h98_style || null (unLoc context)) + = do { checkTc (h98_style || null (fromMaybeContext context)) (badGadtStupidTheta doc) ; (m_sig', sig_fvs) <- case m_sig of @@ -2338,8 +2338,8 @@ rnConDecl (ConDeclGADT { con_names = names rnMbContext :: HsDocContext -> Maybe (LHsContext GhcPs) -> RnM (Maybe (LHsContext GhcRn), FreeVars) rnMbContext _ Nothing = return (Nothing, emptyFVs) -rnMbContext doc (Just cxt) = do { (ctx',fvs) <- rnContext doc cxt - ; return (Just ctx',fvs) } +rnMbContext doc cxt = do { (ctx',fvs) <- rnContext doc cxt + ; return (ctx',fvs) } rnConDeclH98Details :: Name |