diff options
Diffstat (limited to 'compiler/rename')
-rw-r--r-- | compiler/rename/RnTypes.hs | 8 | ||||
-rw-r--r-- | compiler/rename/RnUnbound.hs | 15 |
2 files changed, 4 insertions, 19 deletions
diff --git a/compiler/rename/RnTypes.hs b/compiler/rename/RnTypes.hs index 3703f1ac63..8ec8f3e69f 100644 --- a/compiler/rename/RnTypes.hs +++ b/compiler/rename/RnTypes.hs @@ -44,7 +44,6 @@ import DynFlags import HsSyn import RnHsDoc ( rnLHsDoc, rnMbLHsDoc ) import RnEnv -import RnUnbound ( perhapsForallMsg ) import RnUtils ( HsDocContext(..), withHsDocContext, mapFvRn , pprHsDocContext, bindLocalNamesFV, typeAppErr , newLocalBndrRn, checkDupRdrNames, checkShadowedRdrNames ) @@ -1463,12 +1462,7 @@ warnUnusedForAll in_doc (dL->L loc tv) used_names opTyErr :: Outputable a => RdrName -> a -> SDoc opTyErr op overall_ty = hang (text "Illegal operator" <+> quotes (ppr op) <+> ptext (sLit "in type") <+> quotes (ppr overall_ty)) - 2 extra - where - extra | op == dot_tv_RDR - = perhapsForallMsg - | otherwise - = text "Use TypeOperators to allow operators in types" + 2 (text "Use TypeOperators to allow operators in types") {- ************************************************************************ diff --git a/compiler/rename/RnUnbound.hs b/compiler/rename/RnUnbound.hs index bdda66f00b..2de2fc1f0c 100644 --- a/compiler/rename/RnUnbound.hs +++ b/compiler/rename/RnUnbound.hs @@ -12,7 +12,6 @@ module RnUnbound ( mkUnboundName , WhereLooking(..) , unboundName , unboundNameX - , perhapsForallMsg , notInScopeErr ) where import GhcPrelude @@ -24,7 +23,7 @@ import Name import Module import SrcLoc import Outputable -import PrelNames ( mkUnboundName, forall_tv_RDR, isUnboundName, getUnique) +import PrelNames ( mkUnboundName, isUnboundName, getUnique) import Util import Maybes import DynFlags @@ -78,13 +77,10 @@ unboundNameX where_look rdr_name extra notInScopeErr :: RdrName -> SDoc notInScopeErr rdr_name - = vcat [ hang (text "Not in scope:") - 2 (what <+> quotes (ppr rdr_name)) - , extra ] + = hang (text "Not in scope:") + 2 (what <+> quotes (ppr rdr_name)) where what = pprNonVarNameSpace (occNameSpace (rdrNameOcc rdr_name)) - extra | rdr_name == forall_tv_RDR = perhapsForallMsg - | otherwise = Outputable.empty type HowInScope = Either SrcSpan ImpDeclSpec -- Left loc => locally bound at loc @@ -352,11 +348,6 @@ extensionSuggestions rdrName = text "Perhaps you meant to use RecursiveDo" | otherwise = Outputable.empty -perhapsForallMsg :: SDoc -perhapsForallMsg - = vcat [ text "Perhaps you intended to use ExplicitForAll or similar flag" - , text "to enable explicit-forall syntax: forall <tvs>. <type>"] - qualsInScope :: GlobalRdrElt -> [(ModuleName, HowInScope)] -- Ones for which the qualified version is in scope qualsInScope GRE { gre_name = n, gre_lcl = lcl, gre_imp = is } |