TcClassDcl

ghc-8.10.0.20200123: The GHC API

Safe Haskell | None
Language | Haskell2010

TcClassDcl

Synopsis

- tcClassSigs :: Name -> [LSig GhcRn] -> LHsBinds GhcRn -> TcM [TcMethInfo]
- tcClassDecl2 :: LTyClDecl GhcRn -> TcM (LHsBinds GhcTcId)
- 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
- tcMkDeclCtxt :: TyClDecl GhcRn -> SDoc
- tcAddDeclCtxt :: TyClDecl GhcRn -> TcM a -> TcM a
- 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 GhcTcId) 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 #

tcMkDeclCtxt :: TyClDecl GhcRn -> SDoc Source #

tcAddDeclCtxt :: TyClDecl GhcRn -> TcM a -> TcM a 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