aboutsummaryrefslogtreecommitdiff
path: root/haddock-api/src
diff options
context:
space:
mode:
authorƁukasz Hanuszczak <lukasz.hanuszczak@gmail.com>2015-07-23 19:42:08 +0200
committerMateusz Kowalczyk <fuuzetsu@fuuzetsu.co.uk>2015-08-21 18:22:32 +0100
commit17b91bbf8eea72548e58952f4969606b5cb7b73f (patch)
tree4259c2fb7e51640e897b44d8e8cf15d0aa58c6bd /haddock-api/src
parentdc62b95d18c61fc0bf7c8d4c49d23a240af32568 (diff)
Fix declaration converter to use more appropriate mode for methods.
Diffstat (limited to 'haddock-api/src')
-rw-r--r--haddock-api/src/Haddock/Convert.hs22
1 files changed, 12 insertions, 10 deletions
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)