aboutsummaryrefslogtreecommitdiff
path: root/haddock-api/src/Haddock/Convert.hs
diff options
context:
space:
mode:
authorRyan Scott <ryan.gl.scott@gmail.com>2019-05-12 19:12:15 -0400
committerRyan Scott <ryan.gl.scott@gmail.com>2019-05-14 17:22:13 -0400
commit103a894471b18c9c3b0d9faffe2420e10b420686 (patch)
tree92fcf7f870e55da115399e8299d6c67a68cbe111 /haddock-api/src/Haddock/Convert.hs
parenta31b562f3f3a33ae2b08f9173ea08506b357f3a5 (diff)
Changes for #16110/#16356
Diffstat (limited to 'haddock-api/src/Haddock/Convert.hs')
-rw-r--r--haddock-api/src/Haddock/Convert.hs16
1 files changed, 9 insertions, 7 deletions
diff --git a/haddock-api/src/Haddock/Convert.hs b/haddock-api/src/Haddock/Convert.hs
index 4af0f79d..8e6b0a4c 100644
--- a/haddock-api/src/Haddock/Convert.hs
+++ b/haddock-api/src/Haddock/Convert.hs
@@ -85,19 +85,21 @@ tyThingToLHsDecl prr t = case t of
extractFamilyDecl _ =
Left "tyThingToLHsDecl: impossible associated tycon"
- extractFamDefDecl :: FamilyDecl GhcRn -> Type -> TyFamDefltEqn GhcRn
- extractFamDefDecl fd rhs = FamEqn
+ extractFamDefDecl :: FamilyDecl GhcRn -> Type -> TyFamDefltDecl GhcRn
+ extractFamDefDecl fd rhs =
+ TyFamInstDecl $ HsIB { hsib_ext = hsq_ext (fdTyVars fd)
+ , hsib_body = FamEqn
{ feqn_ext = noExt
, feqn_tycon = fdLName fd
- , feqn_bndrs = Nothing
- -- TODO: this must change eventually
- , feqn_pats = fdTyVars fd
+ , feqn_bndrs = Nothing
+ , feqn_pats = map (HsValArg . hsLTyVarBndrToType) $
+ hsq_explicit $ fdTyVars fd
, feqn_fixity = fdFixity fd
- , feqn_rhs = synifyType WithinType [] rhs }
+ , feqn_rhs = synifyType WithinType [] rhs }}
extractAtItem
:: ClassATItem
- -> Either ErrMsg (LFamilyDecl GhcRn, Maybe (LTyFamDefltEqn GhcRn))
+ -> Either ErrMsg (LFamilyDecl GhcRn, Maybe (LTyFamDefltDecl GhcRn))
extractAtItem (ATI at_tc def) = do
tyDecl <- synifyTyCon prr Nothing at_tc
famDecl <- extractFamilyDecl tyDecl