GHC.Core.Class

ghc-9.2.0.20210821: The GHC API

Safe Haskell | Safe-Inferred
Language | Haskell2010

GHC.Core.Class

Synopsis

- data Class
- type ClassOpItem = (Id, DefMethInfo)
- data ClassATItem = ATI TyCon (Maybe (Type, ATValidityInfo))
- data ATValidityInfo
  - = NoATVI
  - | ATVI SrcSpan [Type]
- type ClassMinimalDef = BooleanFormula Name
- type DefMethInfo = Maybe (Name, DefMethSpec Type)
- pprDefMethInfo :: DefMethInfo -> SDoc
- type FunDep a = ([a], [a])
- pprFundeps :: Outputable a => [FunDep a] -> SDoc
- pprFunDep :: Outputable a => FunDep a -> SDoc
- mkClass :: Name -> [TyVar] -> [FunDep TyVar] -> [PredType] -> [Id] -> [ClassATItem] -> [ClassOpItem] -> ClassMinimalDef -> TyCon -> Class
- mkAbstractClass :: Name -> [TyVar] -> [FunDep TyVar] -> TyCon -> Class
- classTyVars :: Class -> [TyVar]
- classArity :: Class -> Arity
- classKey :: Class -> Unique
- className :: Class -> Name
- classATs :: Class -> [TyCon]
- classATItems :: Class -> [ClassATItem]
- classTyCon :: Class -> TyCon
- classMethods :: Class -> [Id]
- classOpItems :: Class -> [ClassOpItem]
- classBigSig :: Class -> ([TyVar], [PredType], [Id], [ClassOpItem])
- classExtraBigSig :: Class -> ([TyVar], [FunDep TyVar], [PredType], [Id], [ClassATItem], [ClassOpItem])
- classTvsFds :: Class -> ([TyVar], [FunDep TyVar])
- classSCTheta :: Class -> [PredType]
- classAllSelIds :: Class -> [Id]
- classSCSelId :: Class -> Int -> Id
- classSCSelIds :: Class -> [Id]
- classMinimalDef :: Class -> ClassMinimalDef
- classHasFds :: Class -> Bool
- isAbstractClass :: Class -> Bool

# Documentation

data Class Source #

#### Instances

Instances details

Data Class Source # |
Instance details Defined in GHC.Core.Class Methods gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> Class -> c Class Source # gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c Class Source # toConstr :: Class -> Constr Source # dataTypeOf :: Class -> DataType Source # dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c Class) Source # dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c Class) Source # gmapT :: (forall b. Data b => b -> b) -> Class -> Class Source # gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> Class -> r Source # gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> Class -> r Source # gmapQ :: (forall d. Data d => d -> u) -> Class -> [u] Source # gmapQi :: Int -> (forall d. Data d => d -> u) -> Class -> u Source # gmapM :: Monad m => (forall d. Data d => d -> m d) -> Class -> m Class Source # gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> Class -> m Class Source # gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> Class -> m Class Source #
NamedThing Class Source # |
Instance details Defined in GHC.Core.Class Methods getOccName :: Class -> OccName Source # getName :: Class -> Name Source #
Uniquable Class Source # |
Instance details Defined in GHC.Core.Class Methods getUnique :: Class -> Unique Source #
Outputable Class Source # |
Instance details Defined in GHC.Core.Class Methods ppr :: Class -> SDoc Source #
Eq Class Source # |
Instance details Defined in GHC.Core.Class Methods (==) :: Class -> Class -> Bool # (/=) :: Class -> Class -> Bool #

type ClassOpItem = (Id, DefMethInfo) Source #

data ClassATItem Source #

Constructors

ATI TyCon (Maybe (Type, ATValidityInfo)) |

data ATValidityInfo Source #

Information about an associated type family default implementation. This is used solely for validity checking. See `Note [Type-checking default assoc decls]` in GHC.Tc.TyCl.

Constructors

NoATVI |
ATVI SrcSpan [Type] |

type ClassMinimalDef = BooleanFormula Name Source #

type DefMethInfo = Maybe (Name, DefMethSpec Type) Source #

pprDefMethInfo :: DefMethInfo -> SDoc Source #

type FunDep a = ([a], [a]) Source #

pprFundeps :: Outputable a => [FunDep a] -> SDoc Source #

pprFunDep :: Outputable a => FunDep a -> SDoc Source #

mkClass :: Name -> [TyVar] -> [FunDep TyVar] -> [PredType] -> [Id] -> [ClassATItem] -> [ClassOpItem] -> ClassMinimalDef -> TyCon -> Class Source #

mkAbstractClass :: Name -> [TyVar] -> [FunDep TyVar] -> TyCon -> Class Source #

classTyVars :: Class -> [TyVar] Source #

classArity :: Class -> Arity Source #

classKey :: Class -> Unique Source #

className :: Class -> Name Source #

classATs :: Class -> [TyCon] Source #

classATItems :: Class -> [ClassATItem] Source #

classTyCon :: Class -> TyCon Source #

classMethods :: Class -> [Id] Source #

classOpItems :: Class -> [ClassOpItem] Source #

classBigSig :: Class -> ([TyVar], [PredType], [Id], [ClassOpItem]) Source #

classExtraBigSig :: Class -> ([TyVar], [FunDep TyVar], [PredType], [Id], [ClassATItem], [ClassOpItem]) Source #

classTvsFds :: Class -> ([TyVar], [FunDep TyVar]) Source #

classSCTheta :: Class -> [PredType] Source #

classAllSelIds :: Class -> [Id] Source #

classSCSelId :: Class -> Int -> Id Source #

classSCSelIds :: Class -> [Id] Source #

classMinimalDef :: Class -> ClassMinimalDef Source #

classHasFds :: Class -> Bool Source #

isAbstractClass :: Class -> Bool Source #