Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Set -Wno-prepositive-qualified-module in Paths_*.hs #7352

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 0 additions & 2 deletions Cabal/src/Distribution/Simple/Build/PathsModule.hs
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,6 @@ generatePathsModule pkg_descr lbi clbi = Z.render Z.Z
, Z.zVersionDigits = show $ versionNumbers $ packageVersion pkg_descr
, Z.zSupportsCpp = supports_cpp
, Z.zSupportsNoRebindableSyntax = supports_rebindable_syntax
, Z.zSupportsNoMissingSafeHaskellMode = supports_missing_safehaskell
, Z.zAbsolute = absolute
, Z.zRelocatable = relocatable lbi
, Z.zIsWindows = isWindows
Expand All @@ -62,7 +61,6 @@ generatePathsModule pkg_descr lbi clbi = Z.render Z.Z
supports_cpp = supports_language_pragma
supports_rebindable_syntax = ghc_newer_than (mkVersion [7,0,1])
supports_language_pragma = ghc_newer_than (mkVersion [6,6,1])
supports_missing_safehaskell = ghc_newer_than (mkVersion [8,10,1])

ghc_newer_than minVersion =
case compilerCompatVersion GHC (compiler lbi) of
Expand Down
8 changes: 1 addition & 7 deletions Cabal/src/Distribution/Simple/Build/PathsModule/Z.hs
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@ data Z
zVersionDigits :: String,
zSupportsCpp :: Bool,
zSupportsNoRebindableSyntax :: Bool,
zSupportsNoMissingSafeHaskellMode :: Bool,
zAbsolute :: Bool,
zRelocatable :: Bool,
zIsWindows :: Bool,
Expand Down Expand Up @@ -43,12 +42,7 @@ render z_root = execWriter $ do
else do
return ()
tell "{-# OPTIONS_GHC -fno-warn-missing-import-lists #-}\n"
if (zSupportsNoMissingSafeHaskellMode z_root)
then do
tell "{-# OPTIONS_GHC -Wno-missing-safe-haskell-mode #-}\n"
return ()
else do
return ()
tell "{-# OPTIONS_GHC -w #-}\n"
tell "module Paths_"
tell (zManglePkgName z_root (zPackageName z_root))
tell " (\n"
Expand Down
1 change: 0 additions & 1 deletion cabal-dev-scripts/src/GenPathsModule.hs
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,6 @@ $(capture "decls" [d|
, zVersionDigits :: String
, zSupportsCpp :: Bool
, zSupportsNoRebindableSyntax :: Bool
, zSupportsNoMissingSafeHaskellMode :: Bool
, zAbsolute :: Bool
, zRelocatable :: Bool
, zIsWindows :: Bool
Expand Down
4 changes: 1 addition & 3 deletions templates/Paths_pkg.template.hs
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,7 @@
{-# LANGUAGE ForeignFunctionInterface #-}
{% endif %}
{-# OPTIONS_GHC -fno-warn-missing-import-lists #-}
{% if supportsNoMissingSafeHaskellMode %}
{-# OPTIONS_GHC -Wno-missing-safe-haskell-mode #-}
{% endif %}
{-# OPTIONS_GHC -w #-}
module Paths_{{ manglePkgName packageName }} (
version,
getBinDir, getLibDir, getDynLibDir, getDataDir, getLibexecDir,
Expand Down