summaryrefslogtreecommitdiff
path: root/compiler/typecheck/TcBackpack.hs
diff options
context:
space:
mode:
authorEdward Z. Yang <ezyang@cs.stanford.edu>2017-02-10 23:15:30 -0800
committerEdward Z. Yang <ezyang@cs.stanford.edu>2017-02-12 19:14:52 -0800
commit7666a9febae0a578aedabc49bcdc87d487b0e252 (patch)
treecc9db4b47adbd8613cb6d894a678037c2e4fa113 /compiler/typecheck/TcBackpack.hs
parent2f164846884610cf78f02771711cd5613839b952 (diff)
downloadhaskell-7666a9febae0a578aedabc49bcdc87d487b0e252.tar.gz
Disable PVP warnings temporarily.
While the intent is good, they are actually too aggressive: if a module reexports an identifier from a signature, we will warn (even though we should not!) We'll have to implement this differently. Signed-off-by: Edward Z. Yang <ezyang@cs.stanford.edu>
Diffstat (limited to 'compiler/typecheck/TcBackpack.hs')
-rw-r--r--compiler/typecheck/TcBackpack.hs12
1 files changed, 10 insertions, 2 deletions
diff --git a/compiler/typecheck/TcBackpack.hs b/compiler/typecheck/TcBackpack.hs
index fe17af5b7b..cca40d819d 100644
--- a/compiler/typecheck/TcBackpack.hs
+++ b/compiler/typecheck/TcBackpack.hs
@@ -16,7 +16,7 @@ module TcBackpack (
instantiateSignature,
) where
-import BasicTypes (StringLiteral(..), SourceText(..), defaultFixity)
+import BasicTypes (defaultFixity)
import Packages
import TcRnExports
import DynFlags
@@ -412,6 +412,7 @@ ifaceDeclNeverExportedRefs _ = []
-- the wheels of recompilation avoidance which assumes that
-- source files always exist.
+{-
inheritedSigPvpWarning :: WarningTxt
inheritedSigPvpWarning =
WarningTxt (noLoc NoSourceText) [noLoc (StringLiteral NoSourceText (fsLit msg))]
@@ -421,6 +422,7 @@ inheritedSigPvpWarning =
"compatible with PVP-style version bounds. Instead, copy the " ++
"declaration to the local hsig file or move the signature to a " ++
"library of its own and add that library as a dependency."
+-}
-- Note [Handling never-exported TyThings under Backpack]
-- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
@@ -559,9 +561,15 @@ mergeSignatures hsmod lcl_iface0 = do
let thinned_ifaces = reverse rev_thinned_ifaces
exports = nameShapeExports nsubst
rdr_env = mkGlobalRdrEnv (gresFromAvails Nothing exports)
- warn_occs = filter (not . (`elemOccSet` ok_to_use)) (exportOccs exports)
+ _warn_occs = filter (not . (`elemOccSet` ok_to_use)) (exportOccs exports)
+ warns = NoWarnings
+ {-
+ -- TODO: Warnings are transitive, but this is not what we want here:
+ -- if a module reexports an entity from a signature, that should be OK.
+ -- Not supported in current warning framework
warns | null warn_occs = NoWarnings
| otherwise = WarnSome $ map (\o -> (o, inheritedSigPvpWarning)) warn_occs
+ -}
setGblEnv tcg_env {
tcg_rdr_env = rdr_env,
tcg_exports = exports,