[commit: haddock] T6018-injective-type-families, adamse-D1033, ghc-head, wip/10268, wip/10313, wip/D548-master, wip/D548-master-2, wip/T10483, wip/T9840, wip/api-ann-hstylit, wip/api-ann-hstylit-1, wip/api-ann-hstylit-2, wip/api-ann-hstylit-3, wip/api-ann-hstylit-4, wip/api-ann-hstylit-5, wip/ast-prepare-annotations-final5, wip/ast-prepare-annotations-final6, wip/orf-reboot, wip/trac-9744: Follow changes from #9812 (1940912)

git at git.haskell.org git at git.haskell.org
Wed Jul 8 08:33:23 UTC 2015


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

On branches: T6018-injective-type-families,adamse-D1033,ghc-head,wip/10268,wip/10313,wip/D548-master,wip/D548-master-2,wip/T10483,wip/T9840,wip/api-ann-hstylit,wip/api-ann-hstylit-1,wip/api-ann-hstylit-2,wip/api-ann-hstylit-3,wip/api-ann-hstylit-4,wip/api-ann-hstylit-5,wip/ast-prepare-annotations-final5,wip/ast-prepare-annotations-final6,wip/orf-reboot,wip/trac-9744
Link       : http://git.haskell.org/haddock.git/commitdiff/19409126be62383bc64d79698b265ffaf96269a5

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

commit 19409126be62383bc64d79698b265ffaf96269a5
Author: Jan Stolarek <jan.stolarek at p.lodz.pl>
Date:   Wed Nov 19 23:00:19 2014 +0100

    Follow changes from #9812


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

19409126be62383bc64d79698b265ffaf96269a5
 src/Haddock/Convert.hs | 19 ++++++++-----------
 1 file changed, 8 insertions(+), 11 deletions(-)

diff --git a/src/Haddock/Convert.hs b/src/Haddock/Convert.hs
index 08892cd..9efa8ad 100644
--- a/src/Haddock/Convert.hs
+++ b/src/Haddock/Convert.hs
@@ -117,7 +117,7 @@ synifyAxBranch tc (CoAxBranch { cab_tvs = tkvs, cab_lhs = args, cab_rhs = rhs })
 
 synifyAxiom :: CoAxiom br -> HsDecl Name
 synifyAxiom ax@(CoAxiom { co_ax_tc = tc })
-  | isOpenSynFamilyTyCon tc
+  | isOpenTypeFamilyTyCon tc
   , Just branch <- coAxiomSingleBranch_maybe ax
   = InstD (TyFamInstD (TyFamInstDecl { tfid_eqn = noLoc $ synifyAxBranch tc branch
                                      , tfid_fvs = placeHolderNamesTc }))
@@ -152,8 +152,8 @@ synifyTyCon coax tc
                                       , dd_derivs = Nothing }
            , tcdFVs = placeHolderNamesTc }
 
-  | isSynFamilyTyCon tc 
-  = case synTyConRhs_maybe tc of
+  | isTypeFamilyTyCon tc
+  = case famTyConFlav_maybe tc of
       Just rhs ->
         let info = case rhs of
                      OpenSynFamilyTyCon -> OpenTypeFamily
@@ -173,14 +173,11 @@ synifyTyCon coax tc
           FamDecl (FamilyDecl DataFamily (synifyName tc) (synifyTyVars (tyConTyVars tc))
                               Nothing) --always kind '*'
         _ -> error "synifyTyCon: impossible open data type?"
-  | isSynTyCon tc
-  = case synTyConRhs_maybe tc of
-        Just (SynonymTyCon ty) ->
-          SynDecl { tcdLName = synifyName tc
-                  , tcdTyVars = synifyTyVars (tyConTyVars tc)
-                  , tcdRhs = synifyType WithinType ty
-                  , tcdFVs = placeHolderNamesTc }
-        _ -> error "synifyTyCon: impossible synTyCon"
+  | Just ty <- synTyConRhs_maybe tc
+  =  SynDecl { tcdLName = synifyName tc
+             , tcdTyVars = synifyTyVars (tyConTyVars tc)
+             , tcdRhs = synifyType WithinType ty
+             , tcdFVs = placeHolderNamesTc }
   | otherwise =
   -- (closed) newtype and data
   let



More information about the ghc-commits mailing list