summaryrefslogtreecommitdiff
path: root/compiler/rename
diff options
context:
space:
mode:
authorAustin Seipp <austin@well-typed.com>2014-01-14 20:16:26 -0600
committerAustin Seipp <austin@well-typed.com>2014-01-14 20:16:26 -0600
commit235fd88a9a35a6ca1aed70ff71291d7b433e45e4 (patch)
tree6a061872030e2b662db0de656807b387730051fa /compiler/rename
parent3e633d9b77a50e6f34bdcc556d47b4a09faa1d2d (diff)
downloadhaskell-235fd88a9a35a6ca1aed70ff71291d7b433e45e4.tar.gz
Turn -XTypeHoles into a (on by default) warning
After some discussion on ghc-devs@ and elsewhere, it seemed favorable to make this change as type holes don't let any invalid programs though, they merely change what the compiler reports in case of certain errors (namely unbound occurrences, or _ appearing on a LHS.) Now, the warning mechanism is controlled by -f[no-]warn-type-errors, just like any other regular warning. Again, on by default. The documentation and tests have been updated accordingly. Signed-off-by: Austin Seipp <austin@well-typed.com>
Diffstat (limited to 'compiler/rename')
-rw-r--r--compiler/rename/RnExpr.lhs4
1 files changed, 2 insertions, 2 deletions
diff --git a/compiler/rename/RnExpr.lhs b/compiler/rename/RnExpr.lhs
index 3b6361881b..0da22d6725 100644
--- a/compiler/rename/RnExpr.lhs
+++ b/compiler/rename/RnExpr.lhs
@@ -104,7 +104,7 @@ finishHsVar name
rnExpr (HsVar v)
= do { mb_name <- lookupOccRn_maybe v
; case mb_name of {
- Nothing -> do { opt_TypeHoles <- xoptM Opt_TypeHoles
+ Nothing -> do { opt_TypeHoles <- woptM Opt_WarnTypeHoles
; if opt_TypeHoles && startsWithUnderscore (rdrNameOcc v)
then return (HsUnboundVar v, emptyFVs)
else do { n <- reportUnboundName v; finishHsVar n } } ;
@@ -313,7 +313,7 @@ Since all the symbols are reservedops we can simply reject them.
We return a (bogus) EWildPat in each case.
\begin{code}
-rnExpr e@EWildPat = do { holes <- xoptM Opt_TypeHoles
+rnExpr e@EWildPat = do { holes <- woptM Opt_WarnTypeHoles
; if holes
then return (hsHoleExpr, emptyFVs)
else patSynErr e