ghc-8.6.2: The GHC API

Safe HaskellNone
LanguageHaskell2010

RnTypes

Synopsis

Documentation

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

Extract all wild cards from a type.

rnImplicitBndrs :: Bool -> FreeKiTyVarsWithDups -> ([Name] -> RnM (a, FreeVars)) -> RnM (a, 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 GhcPs -> RnM FreeKiTyVarsNoDups 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

extractFilteredRdrTyVarsDups :: LHsType GhcPs -> RnM FreeKiTyVarsWithDups Source #

Finds free type and kind variables in a type, with duplicates, but 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 GhcPs -> RnM FreeKiTyVarsNoDups Source #

extractHsTyRdrTyVars finds the free (kind, type) variables of an HsType or the free (sort, kind) variables of an HsKind. It's used when making the foralls explicit. Does not return any wildcards. When the same name occurs multiple times in the types, only the first occurrence is returned. See Note [Kind and type-variable binders]

extractHsTyRdrTyVarsKindVars :: LHsType GhcPs -> RnM [Located RdrName] Source #

Extracts the free kind variables (but not the type variables) of an HsType. Does not return any wildcards. When the same name occurs multiple times in the type, only the first occurrence is returned. See Note [Kind and type-variable binders]

extractHsTyRdrTyVarsDups :: LHsType GhcPs -> RnM FreeKiTyVarsWithDups Source #

extractHsTyRdrTyVarsDups find the free (kind, type) variables of an HsType or the free (sort, kind) variables of an HsKind. It's used when making the foralls explicit. Does not return any wildcards. When the same name occurs multiple times in the types, all occurrences are returned.

extractHsTysRdrTyVars :: [LHsType GhcPs] -> RnM FreeKiTyVarsNoDups 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 GhcPs] -> RnM FreeKiTyVarsWithDups 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 :: FreeKiTyVarsWithDups -> FreeKiTyVarsNoDups Source #

Removes multiple occurrences of the same name from FreeKiTyVars. If a variable occurs as both a kind and a type variable, only keep the occurrence as a kind variable. See also Note [Kind and type-variable binders]

extractHsTvBndrs :: [LHsTyVarBndr GhcPs] -> FreeKiTyVarsWithDups -> RnM FreeKiTyVarsWithDups Source #