Skip to content

Commit b54ee9f

Browse files
committed
Add test for haskell#7423
i.e. Do not warn on -O2 if flag conditional
1 parent ebc2aa8 commit b54ee9f

File tree

3 files changed

+24
-0
lines changed

3 files changed

+24
-0
lines changed
Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
# cabal check
2+
No errors or warnings could be found in the package.
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
import Test.Cabal.Prelude
2+
3+
-- Do not output warning when an -O2 is behind a cabal flag.
4+
main = cabalTest $ cabal "check" []
Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
cabal-version: 2.2
2+
name: pkg
3+
version: 0
4+
category: example
5+
maintainer: [email protected]
6+
synopsis: synopsys
7+
description: description
8+
license: GPL-3.0-or-later
9+
10+
flag force-O2
11+
default: False
12+
manual: True
13+
14+
library
15+
exposed-modules: Foo
16+
default-language: Haskell2010
17+
if flag(force-O2)
18+
ghc-options: -O2

0 commit comments

Comments
 (0)