Commit cc8d5df 1 parent a5106be commit cc8d5df Copy full SHA for cc8d5df
File tree 7 files changed +48
-0
lines changed
Cabal/src/Distribution/Simple/Build/PathsModule
cabal-testsuite/PackageTests/PathsModule/ImportQualifiedPost
7 files changed +48
-0
lines changed Original file line number Diff line number Diff line change @@ -41,6 +41,14 @@ render z_root = execWriter $ do
41
41
return ()
42
42
else do
43
43
return ()
44
+ if (zSupportsCpp z_root)
45
+ then do
46
+ tell " #if __GLASGOW_HASKELL__ >= 810\n "
47
+ tell " {-# OPTIONS_GHC -Wno-prepositive-qualified-module #-}\n "
48
+ tell " #endif\n "
49
+ return ()
50
+ else do
51
+ return ()
44
52
tell " {-# OPTIONS_GHC -fno-warn-missing-import-lists #-}\n "
45
53
tell " {-# OPTIONS_GHC -w #-}\n "
46
54
tell " module Paths_"
Original file line number Diff line number Diff line change
1
+ module Main where
2
+
3
+ main :: IO ()
4
+ main = return ()
Original file line number Diff line number Diff line change
1
+ name : PathsModule
2
+ version : 0.1
3
+ license : BSD3
4
+ author : Martijn Bastiaan
5
+ category : PackageTests
6
+ build-type : Simple
7
+ Cabal-version : >= 1.2
8
+
9
+ description :
10
+ Check that the generated paths module compiles.
11
+
12
+ Executable TestPathsModule
13
+ main-is : Main.hs
14
+ if impl(ghc >= 8.10.0 )
15
+ ghc-options : -Werror -fwarn-prepositive-qualified-module
16
+ other-modules : Paths_PathsModule
17
+ build-depends : base
Original file line number Diff line number Diff line change
1
+ # Setup configure
2
+ Configuring PathsModule-0.1...
3
+ # Setup build
4
+ Preprocessing executable 'TestPathsModule' for PathsModule-0.1..
5
+ Building executable 'TestPathsModule' for PathsModule-0.1..
Original file line number Diff line number Diff line change
1
+ # Setup configure
2
+ Configuring PathsModule-0.1...
3
+ # Setup build
4
+ Preprocessing executable 'TestPathsModule' for PathsModule-0.1..
5
+ Building executable 'TestPathsModule' for PathsModule-0.1..
Original file line number Diff line number Diff line change
1
+ import Test.Cabal.Prelude
2
+ -- Test that Paths module is generated and available for executables.
3
+ main = setupAndCabalTest $ setup_build []
4
+
Original file line number Diff line number Diff line change 7
7
{% if not absolute % }
8
8
{-# LANGUAGE ForeignFunctionInterface #-}
9
9
{% endif % }
10
+ {% if supportsCpp % }
11
+ #if __GLASGOW_HASKELL__ >= 810
12
+ {-# OPTIONS_GHC -Wno-prepositive-qualified-module #-}
13
+ #endif
14
+ {% endif % }
10
15
{-# OPTIONS_GHC -fno-warn-missing-import-lists #-}
11
16
{-# OPTIONS_GHC -w #-}
12
17
module Paths_ {{ manglePkgName packageName }} (
You can’t perform that action at this time.
0 commit comments