summaryrefslogtreecommitdiff
path: root/compiler/GHC/Rename/Module.hs
diff options
context:
space:
mode:
authorAlan Zimmerman <alan.zimm@gmail.com>2021-02-21 21:16:24 +0000
committerAlan Zimmerman <alan.zimm@gmail.com>2021-02-28 12:46:19 +0000
commit09947ecee1bdc450ce561543f68bee6765122fb5 (patch)
tree960d25ad941ce1ef14ca3ba1581a041708685f9b /compiler/GHC/Rename/Module.hs
parent035d983dfa217bf8784b86e78d6024a3ca1a3f4f (diff)
downloadhaskell-wip/az/maybecontext.tar.gz
Wrap LHsContext in Maybe in the GHC ASTwip/az/maybecontext
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.hs6
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