summaryrefslogtreecommitdiff
path: root/compiler/GHC/Rename/Module.hs
diff options
context:
space:
mode:
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