summaryrefslogtreecommitdiff
path: root/compiler/backpack
diff options
context:
space:
mode:
Diffstat (limited to 'compiler/backpack')
-rw-r--r--compiler/backpack/RnModIface.hs18
1 files changed, 11 insertions, 7 deletions
diff --git a/compiler/backpack/RnModIface.hs b/compiler/backpack/RnModIface.hs
index 7696d5f075..2e738c1ec6 100644
--- a/compiler/backpack/RnModIface.hs
+++ b/compiler/backpack/RnModIface.hs
@@ -451,15 +451,11 @@ rnIfaceDecl d@IfaceFamily{} = do
}
rnIfaceDecl d@IfaceClass{} = do
name <- rnIfaceGlobal (ifName d)
- ctxt <- mapM rnIfaceType (ifCtxt d)
binders <- mapM rnIfaceTyConBinder (ifBinders d)
- ats <- mapM rnIfaceAT (ifATs d)
- sigs <- mapM rnIfaceClassOp (ifSigs d)
- return d { ifName = name
- , ifCtxt = ctxt
+ body <- rnIfaceClassBody (ifBody d)
+ return d { ifName = name
, ifBinders = binders
- , ifATs = ats
- , ifSigs = sigs
+ , ifBody = body
}
rnIfaceDecl d@IfaceAxiom{} = do
name <- rnIfaceNeverExported (ifName d)
@@ -491,6 +487,14 @@ rnIfaceDecl d@IfacePatSyn{} = do
, ifPatTy = pat_ty
}
+rnIfaceClassBody :: Rename IfaceClassBody
+rnIfaceClassBody IfAbstractClass = return IfAbstractClass
+rnIfaceClassBody d@IfConcreteClass{} = do
+ ctxt <- mapM rnIfaceType (ifClassCtxt d)
+ ats <- mapM rnIfaceAT (ifATs d)
+ sigs <- mapM rnIfaceClassOp (ifSigs d)
+ return d { ifClassCtxt = ctxt, ifATs = ats, ifSigs = sigs }
+
rnIfaceFamTyConFlav :: Rename IfaceFamTyConFlav
rnIfaceFamTyConFlav (IfaceClosedSynFamilyTyCon (Just (n, axs)))
= IfaceClosedSynFamilyTyCon . Just <$> ((,) <$> rnIfaceNeverExported n