-
Notifications
You must be signed in to change notification settings - Fork 701
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Don't warn about 'prepositive-qualified-module' in Paths_pkgs
Enabling '-Wprepositive-qualified-module' in a project leads to warnings when used in combination with Cabal's Paths_* feature. Given that this is code outside of a user's control, this warning should be disabled locally.
- Loading branch information
1 parent
dd312ec
commit 921bf6b
Showing
7 changed files
with
49 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
4 changes: 4 additions & 0 deletions
4
cabal-testsuite/PackageTests/PathsModule/ImportQualifiedPost/Main.hs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
module Main where | ||
|
||
main :: IO () | ||
main = return () |
18 changes: 18 additions & 0 deletions
18
cabal-testsuite/PackageTests/PathsModule/ImportQualifiedPost/my.cabal
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
name: PathsModule | ||
version: 0.1 | ||
license: BSD3 | ||
author: Martijn Bastiaan | ||
stability: stable | ||
category: PackageTests | ||
build-type: Simple | ||
Cabal-version: >= 1.2 | ||
|
||
description: | ||
Check that the generated paths module compiles. | ||
|
||
Executable TestPathsModule | ||
main-is: Main.hs | ||
if impl(ghc >= 8.10.0) | ||
ghc-options: -Werror -fwarn-prepositive-qualified-module | ||
other-modules: Paths_PathsModule | ||
build-depends: base |
5 changes: 5 additions & 0 deletions
5
cabal-testsuite/PackageTests/PathsModule/ImportQualifiedPost/setup.cabal.out
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
# Setup configure | ||
Configuring PathsModule-0.1... | ||
# Setup build | ||
Preprocessing executable 'TestPathsModule' for PathsModule-0.1.. | ||
Building executable 'TestPathsModule' for PathsModule-0.1.. |
5 changes: 5 additions & 0 deletions
5
cabal-testsuite/PackageTests/PathsModule/ImportQualifiedPost/setup.out
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
# Setup configure | ||
Configuring PathsModule-0.1... | ||
# Setup build | ||
Preprocessing executable 'TestPathsModule' for PathsModule-0.1.. | ||
Building executable 'TestPathsModule' for PathsModule-0.1.. |
4 changes: 4 additions & 0 deletions
4
cabal-testsuite/PackageTests/PathsModule/ImportQualifiedPost/setup.test.hs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
import Test.Cabal.Prelude | ||
-- Test that Paths module is generated and available for executables. | ||
main = setupAndCabalTest $ setup_build [] | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters