TcClassDcl

ghc-8.6.3: 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] #

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] #

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