From 85dab3d6aacf867a381c8810deaf585a43d42d43 Mon Sep 17 00:00:00 2001 From: Ɓukasz Hanuszczak Date: Thu, 23 Jul 2015 19:15:13 +0200 Subject: Integrate instance specification type into class instance definition. --- haddock-api/src/Haddock/Convert.hs | 8 ++++++-- 1 file changed, 6 insertions(+), 2 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 e51d9df7..3479780a 100644 --- a/haddock-api/src/Haddock/Convert.hs +++ b/haddock-api/src/Haddock/Convert.hs @@ -390,11 +390,15 @@ synifyKindSig :: Kind -> LHsKind Name synifyKindSig k = synifyType WithinType k synifyInstHead :: ([TyVar], [PredType], Class, [Type]) -> InstHead Name -synifyInstHead (_, preds, cls, types) = InstHead +synifyInstHead (tyvars, preds, cls, types) = InstHead { ihdClsName = getName cls , ihdKinds = map (unLoc . synifyType WithinType) ks , ihdTypes = map (unLoc . synifyType WithinType) ts - , ihdInstType = ClassInst $ map (unLoc . synifyType WithinType) preds + , ihdInstType = ClassInst + { clsiCtx = map (unLoc . synifyType WithinType) preds + , clsiTyVars = synifyTyVars tyvars + , clsiSigs = map (synifyIdSig WithinType) $ classMethods cls + } } where (ks,ts) = break (not . isKind) types -- cgit v1.2.3