[commit: haddock] wip/landmine-param-family: Sort out placeholder for HsWB (f5ff539)

git at git.haskell.org git at git.haskell.org
Wed Jul 8 08:30:53 UTC 2015


Repository : ssh://git@git.haskell.org/haddock

On branch  : wip/landmine-param-family
Link       : http://git.haskell.org/haddock.git/commitdiff/f5ff5394e00deb809b9b7a35cf6c6da1a079b6b3

>---------------------------------------------------------------

commit f5ff5394e00deb809b9b7a35cf6c6da1a079b6b3
Author: Alan Zimmerman <alan.zimm at gmail.com>
Date:   Mon Aug 25 13:27:11 2014 +0200

    Sort out placeholder for HsWB


>---------------------------------------------------------------

f5ff5394e00deb809b9b7a35cf6c6da1a079b6b3
 src/Haddock/Interface/Rename.hs | 24 +++++++++++++-----------
 1 file changed, 13 insertions(+), 11 deletions(-)

diff --git a/src/Haddock/Interface/Rename.hs b/src/Haddock/Interface/Rename.hs
index 1e3d011..dd2bd73 100644
--- a/src/Haddock/Interface/Rename.hs
+++ b/src/Haddock/Interface/Rename.hs
@@ -458,15 +458,6 @@ renameClsInstD (ClsInstDecl { cid_overlap_mode = omode
                       , cid_tyfam_insts = lATs', cid_datafam_insts = lADTs' })
 
 
-type instance PostRn DocName NameSet  = PlaceHolder
-type instance PostRn DocName Fixity   = PlaceHolder
-type instance PostRn DocName Bool     = PlaceHolder
-type instance PostRn DocName [Name]   = PlaceHolder
-
-type instance PostTc DocName Kind     = PlaceHolder
-type instance PostTc DocName Type     = PlaceHolder
-type instance PostTc DocName Coercion = PlaceHolder
-
 renameTyFamInstD :: TyFamInstDecl Name -> RnM (TyFamInstDecl DocName)
 renameTyFamInstD (TyFamInstDecl { tfid_eqn = eqn })
   = do { eqn' <- renameLTyFamInstEqn eqn
@@ -479,7 +470,7 @@ renameLTyFamInstEqn (L loc (TyFamEqn { tfe_tycon = tc, tfe_pats = pats_w_bndrs,
        ; pats' <- mapM renameLType (hswb_cts pats_w_bndrs)
        ; rhs' <- renameLType rhs
        ; return (L loc (TyFamEqn { tfe_tycon = tc'
-                                 , tfe_pats = pats_w_bndrs { hswb_cts = pats' }
+                                 , tfe_pats = HsWB pats' PlaceHolder PlaceHolder
                                  , tfe_rhs = rhs' })) }
 
 renameLTyFamDefltEqn :: LTyFamDefltEqn Name -> RnM (LTyFamDefltEqn DocName)
@@ -496,7 +487,9 @@ renameDataFamInstD (DataFamInstDecl { dfid_tycon = tc, dfid_pats = pats_w_bndrs,
   = do { tc' <- renameL tc
        ; pats' <- mapM renameLType (hswb_cts pats_w_bndrs)
        ; defn' <- renameDataDefn defn
-       ; return (DataFamInstDecl { dfid_tycon = tc', dfid_pats = pats_w_bndrs { hswb_cts = pats' }
+       ; return (DataFamInstDecl { dfid_tycon = tc'
+                                 , dfid_pats
+                                       = HsWB pats' PlaceHolder PlaceHolder
                                  , dfid_defn = defn', dfid_fvs = placeHolderNames }) }
 
 renameExportItem :: ExportItem Name -> RnM (ExportItem DocName)
@@ -531,3 +524,12 @@ renameSub (n,doc) = do
   n' <- rename n
   doc' <- renameDocForDecl doc
   return (n', doc')
+
+type instance PostRn DocName NameSet  = PlaceHolder
+type instance PostRn DocName Fixity   = PlaceHolder
+type instance PostRn DocName Bool     = PlaceHolder
+type instance PostRn DocName [Name]   = PlaceHolder
+
+type instance PostTc DocName Kind     = PlaceHolder
+type instance PostTc DocName Type     = PlaceHolder
+type instance PostTc DocName Coercion = PlaceHolder



More information about the ghc-commits mailing list