TcHsSyn

ghc-8.2.2: The GHC API

Safe Haskell | None
Language | Haskell2010

TcHsSyn

Contents

- Extracting types from HsSyn
- Other HsSyn functions
- re-exported from TcMonad
- Zonking

Synopsis

- hsLitType :: HsLit -> TcType
- hsLPatType :: OutPat Id -> Type
- hsPatType :: Pat Id -> Type
- mkHsDictLet :: TcEvBinds -> LHsExpr Id -> LHsExpr Id
- mkHsApp :: LHsExpr name -> LHsExpr name -> LHsExpr name
- mkHsAppTy :: LHsType name -> LHsType name -> LHsType name
- mkHsCaseAlt :: LPat id -> Located (body id) -> LMatch id (Located (body id))
- nlHsIntLit :: Integer -> LHsExpr id
- shortCutLit :: DynFlags -> OverLitVal -> TcType -> Maybe (HsExpr TcId)
- hsOverLitName :: OverLitVal -> Name
- conLikeResTy :: ConLike -> [Type] -> Type
- type TcId = Id
- type TcIdSet = IdSet
- zonkTopDecls :: Bag EvBind -> LHsBinds TcId -> [LRuleDecl TcId] -> [LVectDecl TcId] -> [LTcSpecPrag] -> [LForeignDecl TcId] -> TcM (TypeEnv, Bag EvBind, LHsBinds Id, [LForeignDecl Id], [LTcSpecPrag], [LRuleDecl Id], [LVectDecl Id])
- zonkTopExpr :: HsExpr TcId -> TcM (HsExpr Id)
- zonkTopLExpr :: LHsExpr TcId -> TcM (LHsExpr Id)
- zonkTopBndrs :: [TcId] -> TcM [Id]
- zonkTyBndrsX :: ZonkEnv -> [TcTyVar] -> TcM (ZonkEnv, [TyVar])
- zonkTyVarBindersX :: ZonkEnv -> [TyVarBndr TcTyVar vis] -> TcM (ZonkEnv, [TyVarBndr TyVar vis])
- zonkTyVarBinderX :: ZonkEnv -> TyVarBndr TcTyVar vis -> TcM (ZonkEnv, TyVarBndr TyVar vis)
- emptyZonkEnv :: ZonkEnv
- mkEmptyZonkEnv :: UnboundTyVarZonker -> ZonkEnv
- zonkTcTypeToType :: ZonkEnv -> TcType -> TcM Type
- zonkTcTypeToTypes :: ZonkEnv -> [TcType] -> TcM [Type]
- zonkTyVarOcc :: ZonkEnv -> TyVar -> TcM TcType
- zonkCoToCo :: ZonkEnv -> Coercion -> TcM Coercion
- zonkSigType :: TcType -> TcM Type
- zonkEvBinds :: ZonkEnv -> Bag EvBind -> TcM (ZonkEnv, Bag EvBind)

# Extracting types from HsSyn

hsLitType :: HsLit -> TcType Source #

hsLPatType :: OutPat Id -> Type Source #

hsPatType :: Pat Id -> Type Source #

# Other HsSyn functions

mkHsDictLet :: TcEvBinds -> LHsExpr Id -> LHsExpr Id Source #

mkHsApp :: LHsExpr name -> LHsExpr name -> LHsExpr name Source #

mkHsAppTy :: LHsType name -> LHsType name -> LHsType name Source #

mkHsCaseAlt :: LPat id -> Located (body id) -> LMatch id (Located (body id)) Source #

A simple case alternative with a single pattern, no binds, no guards; pre-typechecking

nlHsIntLit :: Integer -> LHsExpr id Source #

shortCutLit :: DynFlags -> OverLitVal -> TcType -> Maybe (HsExpr TcId) Source #

hsOverLitName :: OverLitVal -> Name Source #

conLikeResTy :: ConLike -> [Type] -> Type Source #

Returns the type of the whole pattern

# re-exported from TcMonad

type TcId = Id Source #

type TcIdSet = IdSet Source #

# Zonking

For a description of "zonking", see Note [What is zonking?] in TcMType

zonkTopDecls :: Bag EvBind -> LHsBinds TcId -> [LRuleDecl TcId] -> [LVectDecl TcId] -> [LTcSpecPrag] -> [LForeignDecl TcId] -> TcM (TypeEnv, Bag EvBind, LHsBinds Id, [LForeignDecl Id], [LTcSpecPrag], [LRuleDecl Id], [LVectDecl Id]) Source #

zonkTopExpr :: HsExpr TcId -> TcM (HsExpr Id) Source #

zonkTopLExpr :: LHsExpr TcId -> TcM (LHsExpr Id) Source #

zonkTopBndrs :: [TcId] -> TcM [Id] Source #

zonkTyBndrsX :: ZonkEnv -> [TcTyVar] -> TcM (ZonkEnv, [TyVar]) Source #

zonkTyVarBindersX :: ZonkEnv -> [TyVarBndr TcTyVar vis] -> TcM (ZonkEnv, [TyVarBndr TyVar vis]) Source #

zonkTyVarBinderX :: ZonkEnv -> TyVarBndr TcTyVar vis -> TcM (ZonkEnv, TyVarBndr TyVar vis) Source #

emptyZonkEnv :: ZonkEnv Source #

mkEmptyZonkEnv :: UnboundTyVarZonker -> ZonkEnv Source #

zonkTcTypeToType :: ZonkEnv -> TcType -> TcM Type Source #

zonkTcTypeToTypes :: ZonkEnv -> [TcType] -> TcM [Type] Source #

zonkTyVarOcc :: ZonkEnv -> TyVar -> TcM TcType Source #

zonkCoToCo :: ZonkEnv -> Coercion -> TcM Coercion Source #

zonkSigType :: TcType -> TcM Type Source #

zonkEvBinds :: ZonkEnv -> Bag EvBind -> TcM (ZonkEnv, Bag EvBind) Source #