diff options
Diffstat (limited to 'haddock-api/src/Haddock/Types.hs')
-rw-r--r-- | haddock-api/src/Haddock/Types.hs | 49 |
1 files changed, 42 insertions, 7 deletions
diff --git a/haddock-api/src/Haddock/Types.hs b/haddock-api/src/Haddock/Types.hs index b4cdc343..f0f1b2f4 100644 --- a/haddock-api/src/Haddock/Types.hs +++ b/haddock-api/src/Haddock/Types.hs @@ -1,5 +1,6 @@ {-# LANGUAGE CPP, DeriveDataTypeable, DeriveFunctor, DeriveFoldable, DeriveTraversable, StandaloneDeriving, TypeFamilies, RecordWildCards #-} {-# LANGUAGE FlexibleContexts #-} +{-# LANGUAGE FlexibleInstances #-} {-# LANGUAGE UndecidableInstances #-} -- Note [Pass sensitive types] {-# OPTIONS_GHC -fno-warn-orphans #-} @@ -347,8 +348,8 @@ data InstType name | TypeInst (Maybe (HsType name)) -- ^ Body (right-hand side) | DataInst (TyClDecl name) -- ^ Data constructors -instance (SourceTextX a, OutputableBndrId a) - => Outputable (InstType a) where +instance (SourceTextX (GhcPass a), OutputableBndrId (GhcPass a)) + => Outputable (InstType (GhcPass a)) where ppr (ClassInst { .. }) = text "ClassInst" <+> ppr clsiCtx <+> ppr clsiTyVars @@ -372,7 +373,7 @@ data PseudoFamilyDecl name = PseudoFamilyDecl } -mkPseudoFamilyDecl :: FamilyDecl name -> PseudoFamilyDecl name +mkPseudoFamilyDecl :: FamilyDecl (GhcPass p) -> PseudoFamilyDecl (GhcPass p) mkPseudoFamilyDecl (FamilyDecl { .. }) = PseudoFamilyDecl { pfdInfo = fdInfo , pfdLName = fdLName @@ -380,11 +381,12 @@ mkPseudoFamilyDecl (FamilyDecl { .. }) = PseudoFamilyDecl , pfdKindSig = fdResultSig } where - mkType (KindedTyVar (L loc name) lkind) = - HsKindSig tvar lkind + mkType (KindedTyVar _ (L loc name) lkind) = + HsKindSig PlaceHolder tvar lkind where - tvar = L loc (HsTyVar NotPromoted (L loc name)) - mkType (UserTyVar name) = HsTyVar NotPromoted name + tvar = L loc (HsTyVar PlaceHolder NotPromoted (L loc name)) + mkType (UserTyVar _ name) = HsTyVar PlaceHolder NotPromoted name + mkType (XTyVarBndr _ ) = panic "haddock:mkPseudoFamilyDecl" -- | An instance head that may have documentation and a source location. @@ -662,3 +664,36 @@ type instance PostRn DocNameI DocName = DocName type instance PostTc DocNameI Kind = PlaceHolder type instance PostTc DocNameI Type = PlaceHolder type instance PostTc DocNameI Coercion = PlaceHolder + + +type instance XForAllTy DocNameI = PlaceHolder +type instance XQualTy DocNameI = PlaceHolder +type instance XTyVar DocNameI = PlaceHolder +type instance XAppsTy DocNameI = PlaceHolder +type instance XAppTy DocNameI = PlaceHolder +type instance XFunTy DocNameI = PlaceHolder +type instance XListTy DocNameI = PlaceHolder +type instance XPArrTy DocNameI = PlaceHolder +type instance XTupleTy DocNameI = PlaceHolder +type instance XSumTy DocNameI = PlaceHolder +type instance XOpTy DocNameI = PlaceHolder +type instance XParTy DocNameI = PlaceHolder +type instance XIParamTy DocNameI = PlaceHolder +type instance XEqTy DocNameI = PlaceHolder +type instance XKindSig DocNameI = PlaceHolder +type instance XSpliceTy DocNameI = PlaceHolder +type instance XDocTy DocNameI = PlaceHolder +type instance XBangTy DocNameI = PlaceHolder +type instance XRecTy DocNameI = PlaceHolder +type instance XExplicitListTy DocNameI = PlaceHolder +type instance XExplicitTupleTy DocNameI = PlaceHolder +type instance XTyLit DocNameI = PlaceHolder +type instance XWildCardTy DocNameI = HsWildCardInfo DocNameI +type instance XXType DocNameI = NewHsTypeX + +type instance XUserTyVar DocNameI = PlaceHolder +type instance XKindedTyVar DocNameI = PlaceHolder +type instance XXTyVarBndr DocNameI = PlaceHolder + +type instance XFieldOcc DocNameI = DocName +type instance XXFieldOcc DocNameI = PlaceHolder |