From 17b91bbf8eea72548e58952f4969606b5cb7b73f Mon Sep 17 00:00:00 2001 From: Ɓukasz Hanuszczak Date: Thu, 23 Jul 2015 19:42:08 +0200 Subject: Fix declaration converter to use more appropriate mode for methods. --- haddock-api/src/Haddock/Convert.hs | 22 ++++++++++++---------- 1 file changed, 12 insertions(+), 10 deletions(-) (limited to 'haddock-api/src/Haddock/Convert.hs') diff --git a/haddock-api/src/Haddock/Convert.hs b/haddock-api/src/Haddock/Convert.hs index 3479780a..2c88dca6 100644 --- a/haddock-api/src/Haddock/Convert.hs +++ b/haddock-api/src/Haddock/Convert.hs @@ -391,16 +391,18 @@ synifyKindSig k = synifyType WithinType k synifyInstHead :: ([TyVar], [PredType], Class, [Type]) -> InstHead Name synifyInstHead (tyvars, preds, cls, types) = InstHead - { ihdClsName = getName cls - , ihdKinds = map (unLoc . synifyType WithinType) ks - , ihdTypes = map (unLoc . synifyType WithinType) ts - , ihdInstType = ClassInst - { clsiCtx = map (unLoc . synifyType WithinType) preds - , clsiTyVars = synifyTyVars tyvars - , clsiSigs = map (synifyIdSig WithinType) $ classMethods cls - } - } - where (ks,ts) = break (not . isKind) types + { ihdClsName = getName cls + , ihdKinds = map (unLoc . synifyType WithinType) ks + , ihdTypes = map (unLoc . synifyType WithinType) ts + , ihdInstType = ClassInst + { clsiCtx = map (unLoc . synifyType WithinType) preds + , clsiTyVars = synifyTyVars tyvars + , clsiSigs = map synifyClsIdSig $ classMethods cls + } + } + where + (ks,ts) = break (not . isKind) types + synifyClsIdSig = synifyIdSig DeleteTopLevelQuantification -- Convert a family instance, this could be a type family or data family synifyFamInst :: FamInst -> Bool -> Either ErrMsg (InstHead Name) -- cgit v1.2.3