diff options
author | Simon Peyton Jones <simonpj@microsoft.com> | 2012-09-20 18:14:26 +0100 |
---|---|---|
committer | Simon Peyton Jones <simonpj@microsoft.com> | 2012-09-20 18:14:26 +0100 |
commit | a1d2c6312c681599586f6ebc582f53a469f43083 (patch) | |
tree | 8efa9e6488d2a544d6614c89efd8bf85c1009b20 /src/Haddock | |
parent | 2ad3ed118a6f9e503649cffa2e924beb607451c1 (diff) |
Follow data type changes in the tc-untouchables branch
Relating entirely to SynTyConRhs
Diffstat (limited to 'src/Haddock')
-rw-r--r-- | src/Haddock/Convert.hs | 9 |
1 files changed, 3 insertions, 6 deletions
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 |