From a1d2c6312c681599586f6ebc582f53a469f43083 Mon Sep 17 00:00:00 2001 From: Simon Peyton Jones Date: Thu, 20 Sep 2012 18:14:26 +0100 Subject: Follow data type changes in the tc-untouchables branch Relating entirely to SynTyConRhs --- src/Haddock/Convert.hs | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) (limited to 'src/Haddock') diff --git a/src/Haddock/Convert.hs b/src/Haddock/Convert.hs index 7c9a2ee5..15fba023 100644 --- a/src/Haddock/Convert.hs +++ b/src/Haddock/Convert.hs @@ -118,11 +118,8 @@ synifyTyCon tc , td_derivs = Nothing } , tcdFVs = placeHolderNames } | isSynFamilyTyCon tc - = case synTyConRhs tc of - SynFamilyTyCon -> - TyFamily TypeFamily (synifyName tc) (synifyTyVars (tyConTyVars tc)) + = TyFamily TypeFamily (synifyName tc) (synifyTyVars (tyConTyVars tc)) (Just (synifyKindSig (synTyConResKind tc))) - _ -> error "synifyTyCon: impossible open type synonym?" | isDataFamilyTyCon tc = --(why no "isOpenAlgTyCon"?) case algTyConRhs tc of @@ -162,8 +159,8 @@ synifyTyCon tc alg_cons = map (synifyDataCon alg_use_gadt_syntax) (tyConDataCons tc) -- "deriving" doesn't affect the signature, no need to specify any. alg_deriv = Nothing - syn_type = synifyType WithinType (synTyConType tc) - defn | isSynTyCon tc = TySynonym syn_type + defn | Just (_, syn_rhs) <- synTyConDefn_maybe tc + = TySynonym (synifyType WithinType syn_rhs) | otherwise = TyData { td_ND = alg_nd, td_ctxt = alg_ctx , td_cType = Nothing , td_kindSig = fmap synifyKindSig alg_kindSig -- cgit v1.2.3