Hoogle Search
Within LTS Haskell 24.39 (ghc-9.10.3)
Note that Stackage only displays results for the latest LTS and Nightly snapshot. Learn more.
tyConForAllTyFlags :: TyCon -> [Type] -> [ForAllTyFlag]ghc GHC.Plugins Given a TyCon and a list of argument types to which the TyCon is applied, determine each argument's visibility (Inferred, Specified, or Required). Wrinkle: consider the following scenario:
T :: forall k. k -> k tyConForAllTyFlags T [forall m. m -> m -> m, S, R, Q]
After substituting, we getT (forall m. m -> m -> m) :: (forall m. m -> m -> m) -> forall n. n -> n -> n
Thus, the first argument is invisible, S is visible, R is invisible again, and Q is visible.NoWarnUnusedForalls :: WarnUnusedForallsghc GHC.Rename.HsType No documentation available.
-
ghc GHC.Rename.HsType Should GHC warn if a quantified type variable goes unused? Usually, the answer is "yes", but in the particular case of binding LHsQTyVars, we avoid emitting warnings. See Note [Suppress -Wunused-foralls when binding LHsQTyVars].
WarnUnusedForalls :: WarnUnusedForallsghc GHC.Rename.HsType No documentation available.
-
ghc GHC.Rename.HsType No documentation available.
mkOpFormRn :: LHsCmdTop GhcRn -> LHsExpr GhcRn -> Fixity -> LHsCmdTop GhcRn -> RnM (HsCmd GhcRn)ghc GHC.Rename.HsType No documentation available.
-
ghc GHC.Rename.Unbound No documentation available.
addNoNestedForallsContextsErr :: HsDocContext -> NestedForallsContextsIn -> LHsType GhcRn -> RnM ()ghc GHC.Rename.Utils A common way to invoke noNestedForallsContextsErr.
-
ghc GHC.Rename.Utils Examines a non-outermost type for foralls or contexts, which are assumed to be nested. For example, in the following declaration:
instance forall a. forall b. C (Either a b)
The outermost forall a is fine, but the nested forall b is not. We invoke noNestedForallsContextsErr on the type forall b. C (Either a b) to catch the nested forall and create a suitable error message. noNestedForallsContextsErr returns Just err_msg if such a forall or context is found, and returns Nothing otherwise. This is currently used in the following places:- In GADT constructor types (in rnConDecl). See Note [GADT abstract syntax] (Wrinkle: No nested foralls or contexts) in GHC.Hs.Type.
- In instance declaration types (in rnClsIntDecl and rnSrcDerivDecl in GHC.Rename.Module and renameSig in GHC.Rename.Bind). See Note [No nested foralls or contexts in instance types] in GHC.Hs.Type.
getInstancesForType :: GhcMonad m => Type -> m [ClsInst]ghc GHC.Runtime.Eval No documentation available.