From e747d584737ed2589b2d0f5c5560fcac5cd6649b Mon Sep 17 00:00:00 2001 From: Simon Hengel Date: Mon, 8 Dec 2025 16:47:20 +0700 Subject: [PATCH] Remove redundant OPTIONS_GHC pragmas from templates (`-w` alone should be sufficient) --- .../src/Distribution/Simple/Build/PackageInfoModule/Z.hs | 1 - Cabal/src/Distribution/Simple/Build/PathsModule/Z.hs | 9 --------- templates/Paths_pkg.template.hs | 6 ------ 3 files changed, 16 deletions(-) diff --git a/Cabal/src/Distribution/Simple/Build/PackageInfoModule/Z.hs b/Cabal/src/Distribution/Simple/Build/PackageInfoModule/Z.hs index 19bf632c4d5..6fdbfb176b7 100644 --- a/Cabal/src/Distribution/Simple/Build/PackageInfoModule/Z.hs +++ b/Cabal/src/Distribution/Simple/Build/PackageInfoModule/Z.hs @@ -22,7 +22,6 @@ render z_root = execWriter $ do return () else do return () - tell "{-# OPTIONS_GHC -Wno-missing-import-lists #-}\n" tell "{-# OPTIONS_GHC -w #-}\n" tell "\n" tell "{-|\n" diff --git a/Cabal/src/Distribution/Simple/Build/PathsModule/Z.hs b/Cabal/src/Distribution/Simple/Build/PathsModule/Z.hs index 8f33717bbda..d401ce305c4 100644 --- a/Cabal/src/Distribution/Simple/Build/PathsModule/Z.hs +++ b/Cabal/src/Distribution/Simple/Build/PathsModule/Z.hs @@ -43,15 +43,6 @@ render z_root = execWriter $ do return () else do return () - if (zSupportsCpp z_root) - then do - tell "#if __GLASGOW_HASKELL__ >= 810\n" - tell "{-# OPTIONS_GHC -Wno-prepositive-qualified-module #-}\n" - tell "#endif\n" - return () - else do - return () - tell "{-# OPTIONS_GHC -Wno-missing-import-lists #-}\n" tell "{-# OPTIONS_GHC -w #-}\n" tell "\n" tell "{-|\n" diff --git a/templates/Paths_pkg.template.hs b/templates/Paths_pkg.template.hs index a9b02b0ef64..9577070e169 100644 --- a/templates/Paths_pkg.template.hs +++ b/templates/Paths_pkg.template.hs @@ -7,12 +7,6 @@ {% if not absolute %} {-# LANGUAGE ForeignFunctionInterface #-} {% endif %} -{% if supportsCpp %} -#if __GLASGOW_HASKELL__ >= 810 -{-# OPTIONS_GHC -Wno-prepositive-qualified-module #-} -#endif -{% endif %} -{-# OPTIONS_GHC -Wno-missing-import-lists #-} {-# OPTIONS_GHC -w #-} {-|