diff options
author | Simon Peyton Jones <simonpj@microsoft.com> | 2012-03-14 17:35:42 +0000 |
---|---|---|
committer | Simon Peyton Jones <simonpj@microsoft.com> | 2012-03-14 17:35:42 +0000 |
commit | 82851383b1477d6a119b289a405363437485b099 (patch) | |
tree | a6d3f60ea1b1a1a47d9c37726b35c8f7cca97153 /src | |
parent | 7b381312437410b3d86ae5e18b951a551213bad8 (diff) |
Follow changes to tcdKindSig (Trac #5937)
Diffstat (limited to 'src')
-rw-r--r-- | src/Haddock/Convert.hs | 15 |
1 files changed, 7 insertions, 8 deletions
diff --git a/src/Haddock/Convert.hs b/src/Haddock/Convert.hs index 480e5728..ca2aa0f0 100644 --- a/src/Haddock/Convert.hs +++ b/src/Haddock/Convert.hs @@ -104,15 +104,14 @@ synifyTyCon tc (zipWith (\fakeTyVar realKind -> noLoc $ KindedTyVar (getName fakeTyVar) - (HsBSig (synifyKind realKind) placeHolderBndrs) - placeHolderKind) + (synifyKindSig realKind)) alphaTyVars --a, b, c... which are unfortunately all kind * (fst . splitKindFunTys $ tyConKind tc) ) -- assume primitive types aren't members of data/newtype families: Nothing -- we have their kind accurately: - (Just (synifyKind (tyConKind tc))) + (Just (synifyKindSig (tyConKind tc))) -- no algebraic constructors: [] -- "deriving" needn't be specified: @@ -121,7 +120,7 @@ synifyTyCon tc case synTyConRhs tc of SynFamilyTyCon -> TyFamily TypeFamily (synifyName tc) (synifyTyVars (tyConTyVars tc)) - (Just (synifyKind (synTyConResKind tc))) -- placeHolderKind + (Just (synifyKindSig (synTyConResKind tc))) _ -> error "synifyTyCon: impossible open type synonym?" | isDataFamilyTyCon tc = --(why no "isOpenAlgTyCon"?) case algTyConRhs tc of @@ -167,7 +166,7 @@ synifyTyCon tc syn_type = synifyType WithinType (synTyConType tc) in if isSynTyCon tc then TySynonym name tyvars typats syn_type placeHolderNames - else TyData alg_nd alg_ctx name Nothing tyvars typats (fmap synifyKind alg_kindSig) alg_cons alg_deriv + else TyData alg_nd alg_ctx name Nothing tyvars typats (fmap synifyKindSig alg_kindSig) alg_cons alg_deriv -- User beware: it is your responsibility to pass True (use_gadt_syntax) @@ -241,7 +240,7 @@ synifyTyVars = map synifyTyVar name = getName tv in if isLiftedTypeKind kind then UserTyVar name placeHolderKind - else KindedTyVar name (HsBSig (synifyKind kind) placeHolderBndrs) placeHolderKind + else KindedTyVar name (synifyKindSig kind) --states of what to do with foralls: @@ -309,8 +308,8 @@ synifyType s forallty@(ForAllTy _tv _ty) = in noLoc $ HsForAllTy forallPlicitness sTvs sCtx sTau -synifyKind :: Kind -> LHsKind Name -synifyKind = synifyType (error "synifyKind") +synifyKindSig :: Kind -> HsBndrSig (LHsKind Name) +synifyKindSig k = HsBSig (synifyType (error "synifyKind") k) placeHolderBndrs synifyInstHead :: ([TyVar], [PredType], Class, [Type]) -> ([HsType Name], Name, [HsType Name]) |