Commit 7666a9fe authored by Edward Z. Yang's avatar Edward Z. Yang

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: default avatarEdward Z. Yang <ezyang@cs.stanford.edu>
parent 2f164846
......@@ -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,
......
......@@ -4,7 +4,3 @@
[2 of 2] Processing q
[1 of 2] Compiling H2[sig] ( q/H2.hsig, nothing )
[2 of 2] Compiling B ( q/B.hs, nothing )
bkp10.bkp:13:18: warning: [-Wdeprecations (in -Wdefault)]
In the use of type constructor or class ‘S’ (imported from H2):
"Inherited requirements from non-signature libraries (libraries with modules) should not be used, as this mode of use is not 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."
......@@ -5,11 +5,3 @@
[2 of 2] Processing q
[1 of 2] Compiling H[sig] ( q/H.hsig, nothing )
[2 of 2] Compiling B ( q/B.hs, nothing )
bkp11.bkp:16:14: warning: [-Wdeprecations (in -Wdefault)]
In the use of type constructor or class ‘S’ (imported from H):
"Inherited requirements from non-signature libraries (libraries with modules) should not be used, as this mode of use is not 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."
bkp11.bkp:16:19: warning: [-Wdeprecations (in -Wdefault)]
In the use of type constructor or class ‘T’ (imported from H):
"Inherited requirements from non-signature libraries (libraries with modules) should not be used, as this mode of use is not 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."
......@@ -11,10 +11,6 @@
[4 of 5] Processing q
[1 of 2] Compiling B[sig] ( q/B.hsig, nothing )
[2 of 2] Compiling Q ( q/Q.hs, nothing )
bkp24.bkp:23:24: warning: [-Wdeprecations (in -Wdefault)]
In the use of type constructor or class ‘B’ (imported from B):
"Inherited requirements from non-signature libraries (libraries with modules) should not be used, as this mode of use is not 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."
[5 of 5] Processing r
Instantiating r
[1 of 2] Including q[B=b:B]
......
......@@ -7,7 +7,3 @@
[3 of 3] Processing q
[1 of 2] Compiling B[sig] ( q/B.hsig, nothing )
[2 of 2] Compiling Q ( q/Q.hs, nothing )
bkp36.bkp:20:16: warning: [-Wdeprecations (in -Wdefault)]
In the use of type constructor or class ‘T’ (imported from B):
"Inherited requirements from non-signature libraries (libraries with modules) should not be used, as this mode of use is not 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."
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment