diff options
-rw-r--r-- | compiler/rename/RnTypes.lhs | 4 | ||||
-rw-r--r-- | testsuite/tests/rename/should_compile/T4426.stderr | 10 |
2 files changed, 7 insertions, 7 deletions
diff --git a/compiler/rename/RnTypes.lhs b/compiler/rename/RnTypes.lhs index 5537526bf5..c719191dec 100644 --- a/compiler/rename/RnTypes.lhs +++ b/compiler/rename/RnTypes.lhs @@ -156,7 +156,7 @@ rnHsTyKi isType doc (HsForAllTy Implicit _ lctxt@(L _ ctxt) ty) rnForAll doc Implicit forall_kvs (mkHsQTvs tyvar_bndrs) lctxt ty -rnHsTyKi isType doc (HsForAllTy Qualified _ lctxt@(L _ ctxt) ty) +rnHsTyKi isType doc fulltype@(HsForAllTy Qualified _ lctxt@(L _ ctxt) ty) = ASSERT( isType ) do rdr_env <- getLocalRdrEnv loc <- getSrcSpanM @@ -164,7 +164,7 @@ rnHsTyKi isType doc (HsForAllTy Qualified _ lctxt@(L _ ctxt) ty) (forall_kvs, forall_tvs) = filterInScope rdr_env $ extractHsTysRdrTyVars (ty:ctxt) tyvar_bndrs = userHsTyVarBndrs loc forall_tvs - in_type_doc = ptext (sLit "In the type") <+> quotes (ppr ty) + in_type_doc = ptext (sLit "In the type") <+> quotes (ppr fulltype) -- See Note [Context quantification] warnContextQuantification (in_type_doc $$ docOfHsDocContext doc) tyvar_bndrs diff --git a/testsuite/tests/rename/should_compile/T4426.stderr b/testsuite/tests/rename/should_compile/T4426.stderr index 3cce30558e..f4e0c471d6 100644 --- a/testsuite/tests/rename/should_compile/T4426.stderr +++ b/testsuite/tests/rename/should_compile/T4426.stderr @@ -3,33 +3,33 @@ T4426.hs:6:12: Warning: Variable ‘m’ is implicitly quantified due to a context Use explicit forall syntax instead. This will become an error in GHC 7.12. - In the type ‘a -> m a’ + In the type ‘Monad m => a -> m a’ In the declaration for type synonym ‘F’ T4426.hs:8:15: Warning: Variable ‘b’ is implicitly quantified due to a context Use explicit forall syntax instead. This will become an error in GHC 7.12. - In the type ‘a -> b’ + In the type ‘Eq b => a -> b’ In the definition of data constructor ‘X’ T4426.hs:10:21: Warning: Variable ‘b’ is implicitly quantified due to a context Use explicit forall syntax instead. This will become an error in GHC 7.12. - In the type ‘a -> b -> c’ + In the type ‘Eq b => a -> b -> c’ In the definition of data constructor ‘Y’ T4426.hs:10:21: Warning: Variable ‘c’ is implicitly quantified due to a context Use explicit forall syntax instead. This will become an error in GHC 7.12. - In the type ‘a -> b -> c’ + In the type ‘Eq b => a -> b -> c’ In the definition of data constructor ‘Y’ T4426.hs:12:17: Warning: Variable ‘m’ is implicitly quantified due to a context Use explicit forall syntax instead. This will become an error in GHC 7.12. - In the type ‘m b’ + In the type ‘Monad m => m b’ In the type signature for ‘f’ |