ghc-8.2.2: The GHC API

Safe Haskell | None
Language | Haskell2010

TcClassDcl

Synopsis

- tcClassSigs :: Name -> [LSig Name] -> LHsBinds Name -> TcM [TcMethInfo]
- tcClassDecl2 :: LTyClDecl Name -> TcM (LHsBinds Id)
- findMethodBind :: Name -> LHsBinds Name -> TcPragEnv -> Maybe (LHsBind Name, SrcSpan, [LSig Name])
- instantiateMethod :: Class -> Id -> [TcType] -> TcType
- tcClassMinimalDef :: Name -> [LSig Name] -> [TcMethInfo] -> TcM ClassMinimalDef
- type HsSigFun = Name -> Maybe (LHsSigType Name)
- mkHsSigFun :: [LSig Name] -> HsSigFun
- tcMkDeclCtxt :: TyClDecl Name -> SDoc
- tcAddDeclCtxt :: TyClDecl Name -> TcM a -> TcM a
- badMethodErr :: Outputable a => a -> Name -> SDoc
- tcATDefault :: Bool -> SrcSpan -> TCvSubst -> NameSet -> ClassATItem -> TcM [FamInst]

# Documentation

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

tcClassDecl2 :: LTyClDecl Name -> TcM (LHsBinds Id) #

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

instantiateMethod :: Class -> Id -> [TcType] -> TcType #

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

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

mkHsSigFun :: [LSig Name] -> HsSigFun #

tcMkDeclCtxt :: TyClDecl Name -> SDoc #

tcAddDeclCtxt :: TyClDecl Name -> TcM a -> TcM a #

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

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

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