ghc-8.0.2: The GHC API

Safe Haskell | None
Language | Haskell2010

TcTyDecls

Contents

- Roles
- Implicits
- Record selectors

Synopsis

- calcRecFlags :: SelfBootInfo -> Bool -> RoleAnnots -> [TyCon] -> RecTyInfo
- data RecTyInfo = RTI {
  - rti_roles :: Name -> [Role]
  - rti_is_rec :: Name -> RecFlag
  }
- calcSynCycles :: [LTyClDecl Name] -> [SCC (LTyClDecl Name)]
- checkClassCycles :: Class -> Maybe SDoc
- type RoleAnnots = NameEnv (LRoleAnnotDecl Name)
- extractRoleAnnots :: TyClGroup Name -> RoleAnnots
- emptyRoleAnnots :: RoleAnnots
- lookupRoleAnnots :: RoleAnnots -> Name -> Maybe (LRoleAnnotDecl Name)
- tcAddImplicits :: [TyCon] -> TcM TcGblEnv
- mkDefaultMethodType :: Class -> Id -> DefMethSpec Type -> Type
- mkRecSelBinds :: [TyCon] -> HsValBinds Name
- mkOneRecordSelector :: [ConLike] -> RecSelParent -> FieldLabel -> (LSig Name, (RecFlag, LHsBinds Name))

# Documentation

calcRecFlags :: SelfBootInfo -> Bool -> RoleAnnots -> [TyCon] -> RecTyInfo Source #

data RecTyInfo Source #

Constructors

RTI |
Fields rti_roles :: Name -> [Role] rti_is_rec :: Name -> RecFlag

calcSynCycles :: [LTyClDecl Name] -> [SCC (LTyClDecl Name)] Source #

checkClassCycles :: Class -> Maybe SDoc Source #

# Roles

type RoleAnnots = NameEnv (LRoleAnnotDecl Name) Source #

extractRoleAnnots :: TyClGroup Name -> RoleAnnots Source #

emptyRoleAnnots :: RoleAnnots Source #

lookupRoleAnnots :: RoleAnnots -> Name -> Maybe (LRoleAnnotDecl Name) Source #

# Implicits

tcAddImplicits :: [TyCon] -> TcM TcGblEnv Source #

mkDefaultMethodType :: Class -> Id -> DefMethSpec Type -> Type Source #

# Record selectors

mkRecSelBinds :: [TyCon] -> HsValBinds Name Source #

mkOneRecordSelector :: [ConLike] -> RecSelParent -> FieldLabel -> (LSig Name, (RecFlag, LHsBinds Name)) Source #