RnTypes

ghc-8.2.1: The GHC API

Safe Haskell | None
Language | Haskell2010

RnTypes

Synopsis

- rnHsType :: HsDocContext -> HsType RdrName -> RnM (HsType Name, FreeVars)
- rnLHsType :: HsDocContext -> LHsType RdrName -> RnM (LHsType Name, FreeVars)
- rnLHsTypes :: HsDocContext -> [LHsType RdrName] -> RnM ([LHsType Name], FreeVars)
- rnContext :: HsDocContext -> LHsContext RdrName -> RnM (LHsContext Name, FreeVars)
- rnHsKind :: HsDocContext -> HsKind RdrName -> RnM (HsKind Name, FreeVars)
- rnLHsKind :: HsDocContext -> LHsKind RdrName -> RnM (LHsKind Name, FreeVars)
- rnHsSigType :: HsDocContext -> LHsSigType RdrName -> RnM (LHsSigType Name, FreeVars)
- rnHsWcType :: HsDocContext -> LHsWcType RdrName -> RnM (LHsWcType Name, FreeVars)
- rnHsSigWcType :: HsDocContext -> LHsSigWcType RdrName -> RnM (LHsSigWcType Name, FreeVars)
- rnHsSigWcTypeScoped :: HsDocContext -> LHsSigWcType RdrName -> (LHsSigWcType Name -> RnM (a, FreeVars)) -> RnM (a, FreeVars)
- rnLHsInstType :: SDoc -> LHsSigType RdrName -> RnM (LHsSigType Name, FreeVars)
- newTyVarNameRn :: Maybe a -> Located RdrName -> RnM Name
- collectAnonWildCards :: LHsType Name -> [Name]
- rnConDeclFields :: HsDocContext -> [FieldLabel] -> [LConDeclField RdrName] -> RnM ([LConDeclField Name], FreeVars)
- rnLTyVar :: Located RdrName -> RnM (Located Name)
- mkOpAppRn :: LHsExpr Name -> LHsExpr Name -> Fixity -> LHsExpr Name -> RnM (HsExpr Name)
- mkNegAppRn :: LHsExpr id -> SyntaxExpr id -> RnM (HsExpr id)
- mkOpFormRn :: LHsCmdTop Name -> LHsExpr Name -> Fixity -> LHsCmdTop Name -> RnM (HsCmd Name)
- mkConOpPatRn :: Located Name -> Fixity -> LPat Name -> LPat Name -> RnM (Pat Name)
- checkPrecMatch :: Name -> MatchGroup Name body -> RnM ()
- checkSectionPrec :: FixityDirection -> HsExpr RdrName -> LHsExpr Name -> LHsExpr Name -> RnM ()
- bindLHsTyVarBndr :: HsDocContext -> Maybe a -> NameSet -> NameSet -> LHsTyVarBndr RdrName -> ([Name] -> NameSet -> LHsTyVarBndr Name -> RnM (b, FreeVars)) -> RnM (b, FreeVars)
- bindSigTyVarsFV :: [Name] -> RnM (a, FreeVars) -> RnM (a, FreeVars)
- bindHsQTyVars :: forall a b. HsDocContext -> Maybe SDoc -> Maybe a -> [Located RdrName] -> LHsQTyVars RdrName -> (LHsQTyVars Name -> NameSet -> RnM (b, FreeVars)) -> RnM (b, FreeVars)
- bindLRdrNames :: [Located RdrName] -> ([Name] -> RnM (a, FreeVars)) -> RnM (a, FreeVars)
- extractFilteredRdrTyVars :: LHsType RdrName -> RnM FreeKiTyVars
- extractHsTyRdrTyVars :: LHsType RdrName -> RnM FreeKiTyVars
- extractHsTysRdrTyVars :: [LHsType RdrName] -> RnM FreeKiTyVars
- extractHsTysRdrTyVarsDups :: [LHsType RdrName] -> RnM FreeKiTyVars
- rmDupsInRdrTyVars :: FreeKiTyVars -> FreeKiTyVars
- extractRdrKindSigVars :: LFamilyResultSig RdrName -> RnM [Located RdrName]
- extractDataDefnKindVars :: HsDataDefn RdrName -> RnM [Located RdrName]
- freeKiTyVarsAllVars :: FreeKiTyVars -> [Located RdrName]
- freeKiTyVarsKindVars :: FreeKiTyVars -> [Located RdrName]
- freeKiTyVarsTypeVars :: FreeKiTyVars -> [Located RdrName]

# Documentation

rnHsType :: HsDocContext -> HsType RdrName -> RnM (HsType Name, FreeVars) Source #

rnLHsType :: HsDocContext -> LHsType RdrName -> RnM (LHsType Name, FreeVars) Source #

rnLHsTypes :: HsDocContext -> [LHsType RdrName] -> RnM ([LHsType Name], FreeVars) Source #

rnContext :: HsDocContext -> LHsContext RdrName -> RnM (LHsContext Name, FreeVars) Source #

rnHsKind :: HsDocContext -> HsKind RdrName -> RnM (HsKind Name, FreeVars) Source #

rnLHsKind :: HsDocContext -> LHsKind RdrName -> RnM (LHsKind Name, FreeVars) Source #

rnHsSigType :: HsDocContext -> LHsSigType RdrName -> RnM (LHsSigType Name, FreeVars) Source #

rnHsWcType :: HsDocContext -> LHsWcType RdrName -> RnM (LHsWcType Name, FreeVars) Source #

rnHsSigWcType :: HsDocContext -> LHsSigWcType RdrName -> RnM (LHsSigWcType Name, FreeVars) Source #

rnHsSigWcTypeScoped :: HsDocContext -> LHsSigWcType RdrName -> (LHsSigWcType Name -> RnM (a, FreeVars)) -> RnM (a, FreeVars) Source #

rnLHsInstType :: SDoc -> LHsSigType RdrName -> RnM (LHsSigType Name, FreeVars) Source #

newTyVarNameRn :: Maybe a -> Located RdrName -> RnM Name Source #

collectAnonWildCards :: LHsType Name -> [Name] Source #

Extract all wild cards from a type.

rnConDeclFields :: HsDocContext -> [FieldLabel] -> [LConDeclField RdrName] -> RnM ([LConDeclField Name], FreeVars) Source #

rnLTyVar :: Located RdrName -> RnM (Located Name) Source #

mkOpAppRn :: LHsExpr Name -> LHsExpr Name -> Fixity -> LHsExpr Name -> RnM (HsExpr Name) Source #

mkNegAppRn :: LHsExpr id -> SyntaxExpr id -> RnM (HsExpr id) Source #

mkOpFormRn :: LHsCmdTop Name -> LHsExpr Name -> Fixity -> LHsCmdTop Name -> RnM (HsCmd Name) Source #

mkConOpPatRn :: Located Name -> Fixity -> LPat Name -> LPat Name -> RnM (Pat Name) Source #

checkPrecMatch :: Name -> MatchGroup Name body -> RnM () Source #

checkSectionPrec :: FixityDirection -> HsExpr RdrName -> LHsExpr Name -> LHsExpr Name -> RnM () Source #

bindLHsTyVarBndr :: HsDocContext -> Maybe a -> NameSet -> NameSet -> LHsTyVarBndr RdrName -> ([Name] -> NameSet -> LHsTyVarBndr Name -> RnM (b, FreeVars)) -> RnM (b, FreeVars) Source #

bindSigTyVarsFV :: [Name] -> RnM (a, FreeVars) -> RnM (a, FreeVars) Source #

bindHsQTyVars :: forall a b. HsDocContext -> Maybe SDoc -> Maybe a -> [Located RdrName] -> LHsQTyVars RdrName -> (LHsQTyVars Name -> NameSet -> RnM (b, FreeVars)) -> RnM (b, FreeVars) Source #

bindLRdrNames :: [Located RdrName] -> ([Name] -> RnM (a, FreeVars)) -> RnM (a, FreeVars) Source #

Simply bring a bunch of RdrNames into scope. No checking for validity, at all. The binding location is taken from the location on each name.

extractFilteredRdrTyVars :: LHsType RdrName -> RnM FreeKiTyVars Source #

Finds free type and kind variables in a type, without duplicates, and without variables that are already in scope in LocalRdrEnv NB: this includes named wildcards, which look like perfectly ordinary type variables at this point

extractHsTyRdrTyVars :: LHsType RdrName -> RnM FreeKiTyVars Source #

extractHsTysRdrTyVars :: [LHsType RdrName] -> RnM FreeKiTyVars Source #

Extracts free type and kind variables from types in a list. When the same name occurs multiple times in the types, only the first occurrence is returned and the rest is filtered out. See Note [Kind and type-variable binders]

extractHsTysRdrTyVarsDups :: [LHsType RdrName] -> RnM FreeKiTyVars Source #

Extracts free type and kind variables from types in a list. When the same name occurs multiple times in the types, all occurrences are returned.

rmDupsInRdrTyVars :: FreeKiTyVars -> FreeKiTyVars Source #

Removes multiple occurrences of the same name from FreeKiTyVars.

extractRdrKindSigVars :: LFamilyResultSig RdrName -> RnM [Located RdrName] Source #

extractDataDefnKindVars :: HsDataDefn RdrName -> RnM [Located RdrName] Source #

freeKiTyVarsAllVars :: FreeKiTyVars -> [Located RdrName] Source #

freeKiTyVarsKindVars :: FreeKiTyVars -> [Located RdrName] Source #

freeKiTyVarsTypeVars :: FreeKiTyVars -> [Located RdrName] Source #