diff options
author | Jan Stolarek <jan.stolarek@p.lodz.pl> | 2014-11-19 23:00:19 +0100 |
---|---|---|
committer | Jan Stolarek <jan.stolarek@p.lodz.pl> | 2014-11-20 17:48:43 +0100 |
commit | 19409126be62383bc64d79698b265ffaf96269a5 (patch) | |
tree | 00182eb9b23717e4166f2410cebbc1b77ba6e9fb /src/Haddock | |
parent | bf80e2f594777c0c32fae092454bff0c13ae6181 (diff) |
Follow changes from #9812
Diffstat (limited to 'src/Haddock')
-rw-r--r-- | src/Haddock/Convert.hs | 19 |
1 files changed, 8 insertions, 11 deletions
diff --git a/src/Haddock/Convert.hs b/src/Haddock/Convert.hs index 08892cd3..9efa8ad4 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 |