ghc-8.10.1: The GHC API
Safe HaskellNone
LanguageHaskell2010

RnTypes

Synopsis

Documentation

data HsSigWcTypeScoping Source #

Constructors

AlwaysBind

Always bind any free tyvars of the given type, regardless of whether we have a forall at the top

BindUnlessForall

Unless there's forall at the top, do the same thing as AlwaysBind

NeverBind

Never bind any free tyvars

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.

extractHsTyRdrTyVars :: LHsType GhcPs -> FreeKiTyVarsNoDups Source #

extractHsTyRdrTyVars finds the type/kind variables of a HsType/HsKind. It's used when making the foralls explicit. 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 -> FreeKiTyVarsNoDups Source #

Extracts the free type/kind variables from the kind signature of a HsType. This is used to implicitly quantify over k in type T = Nothing :: Maybe k. When the same name occurs multiple times in the type, only the first occurrence is returned, and the left-to-right order of variables is preserved. See Note [Kind and type-variable binders] and Note [Ordering of implicit variables] and Note [Implicit quantification in type synonyms].

extractHsTysRdrTyVarsDups :: [LHsType GhcPs] -> 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.

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

nubL :: Eq a => [Located a] -> [Located a] Source #