GHC.Tc.TyCl.Class

ghc-9.0.0.20201227: The GHC API

Safe Haskell | None
Language | Haskell2010

GHC.Tc.TyCl.Class

Description

Typechecking class declarations

Synopsis

- tcClassSigs :: Name -> [LSig GhcRn] -> LHsBinds GhcRn -> TcM [TcMethInfo]
- tcClassDecl2 :: LTyClDecl GhcRn -> TcM (LHsBinds GhcTc)
- findMethodBind :: Name -> LHsBinds GhcRn -> TcPragEnv -> Maybe (LHsBind GhcRn, SrcSpan, [LSig GhcRn])
- instantiateMethod :: Class -> TcId -> [TcType] -> TcType
- tcClassMinimalDef :: Name -> [LSig GhcRn] -> [TcMethInfo] -> TcM ClassMinimalDef
- type HsSigFun = Name -> Maybe (LHsSigType GhcRn)
- mkHsSigFun :: [LSig GhcRn] -> HsSigFun
- badMethodErr :: Outputable a => a -> Name -> SDoc
- instDeclCtxt1 :: LHsSigType GhcRn -> SDoc
- instDeclCtxt2 :: Type -> SDoc
- instDeclCtxt3 :: Class -> [Type] -> SDoc
- tcATDefault :: SrcSpan -> TCvSubst -> NameSet -> ClassATItem -> TcM [FamInst]

# Documentation

tcClassSigs :: Name -> [LSig GhcRn] -> LHsBinds GhcRn -> TcM [TcMethInfo] Source #

tcClassDecl2 :: LTyClDecl GhcRn -> TcM (LHsBinds GhcTc) Source #

findMethodBind :: Name -> LHsBinds GhcRn -> TcPragEnv -> Maybe (LHsBind GhcRn, SrcSpan, [LSig GhcRn]) Source #

instantiateMethod :: Class -> TcId -> [TcType] -> TcType Source #

tcClassMinimalDef :: Name -> [LSig GhcRn] -> [TcMethInfo] -> TcM ClassMinimalDef Source #

type HsSigFun = Name -> Maybe (LHsSigType GhcRn) Source #

mkHsSigFun :: [LSig GhcRn] -> HsSigFun Source #

badMethodErr :: Outputable a => a -> Name -> SDoc Source #

instDeclCtxt1 :: LHsSigType GhcRn -> SDoc Source #

instDeclCtxt2 :: Type -> SDoc Source #

instDeclCtxt3 :: Class -> [Type] -> SDoc Source #

tcATDefault :: SrcSpan -> TCvSubst -> NameSet -> ClassATItem -> TcM [FamInst] Source #

Construct default instances for any associated types that aren't given a user definition Returns [] or singleton