@@ -19,8 +19,8 @@ flag dev
1919 manual : True
2020 default : False
2121
22- flag db-tests
23- description : Turn on tests with database .
22+ flag build-examples
23+ description : Whether to build (and test) examples .
2424 manual : False
2525 default : False
2626
@@ -84,35 +84,36 @@ test-suite tests
8484 default-language : Haskell2010
8585
8686 if flag(dev)
87- ghc-options : -Wall -Werror
87+ ghc-options : -Werror
8888 else
89- ghc-options : -O2 -Wall
89+ ghc-options : -O2
9090
9191
9292test-suite examples
9393 type : exitcode-stdio-1.0
9494
95- hs-source-dirs : examples
96- main-is : Main.hs
95+ hs-source-dirs : examples
96+ main-is : Main.hs
97+ default-language : Haskell2010
9798
98- ghc-options : -Wall
99+ ghc-options : -Wall -Wno-redundant-constraints
99100
100- build-depends : base >= 4.7 && < 5.0
101- , attoparsec >= 0.13.0 && < 0.14
102- , bytestring >= 0.10.8 && < 0.11
103- , case-conversion
104- , data-default
105- , hspec
106- , postgresql-simple >= 0.5.2 && < 0.6
107- , postgresql-simple-bind
108- , text >= 1.2.2 && < 1.3
101+ if flag(build-examples)
102+ build-depends : base >= 4.7 && < 5.0
103+ , attoparsec >= 0.13.0 && < 0.14
104+ , bytestring >= 0.10.8 && < 0.11
105+ , case-conversion
106+ , data-default
107+ , hspec
108+ , postgresql-simple >= 0.5.2 && < 0.6
109+ , postgresql-simple-bind
110+ , text >= 1.2.2 && < 1.3
109111
110- default-language : Haskell2010
112+ if flag(dev)
113+ ghc-options : -Werror
114+ else
115+ ghc-options : -O2
111116
112- if flag(dev)
113- ghc-options : -Wall -Wno-redundant-constraints -Werror
114117 else
115- ghc-options : -O2 -Wall -Wno-redundant-constraints
118+ buildable : False
116119
117- if flag(db-tests)
118- cpp-options : -DDBTests
0 commit comments