@@ -1353,6 +1353,15 @@ system-dependent values for these fields.
1353
1353
from the same package can be specified with the shorthand syntax
1354
1354
``my-package:{my-library1,my-library2} ``.
1355
1355
1356
+ .. Note ::
1357
+
1358
+ The :pkg-field: `build-depends ` field of an executable section (from
1359
+ version 1.8 of the Cabal specification), test suite section (from
1360
+ version 1.10) or benchmark section (from version 1.14) can specify a
1361
+ library in the same package by the name of the library (without a version
1362
+ constraint). Cabal then treats the executable, test suite or benchmark as
1363
+ if it were in another package that depended on the package.
1364
+
1356
1365
.. Note ::
1357
1366
1358
1367
Before version 3.4 of the Cabal specification, from version 2.0, a
@@ -2317,7 +2326,7 @@ Configurations
2317
2326
2318
2327
Library and executable sections may include conditional blocks, which
2319
2328
test for various system parameters and configuration flags. The flags
2320
- mechanism is rather generic, but most of the time a flag represents
2329
+ mechanism is rather generic, but most of the time a flag represents a
2321
2330
certain feature, that can be switched on or off by the package user.
2322
2331
Here is an example package description file using configurations:
2323
2332
@@ -2378,8 +2387,9 @@ Example: A package containing a library and executable programs
2378
2387
2379
2388
Executable test1
2380
2389
Main-is: T1.hs
2381
- Other-Modules: Testing.Test1
2382
- Build-Depends: base >= 4.2 && < 4.9
2390
+ Build-Depends:
2391
+ , base >= 4.2 && < 4.9
2392
+ , Test1
2383
2393
Default-Language: Haskell2010
2384
2394
2385
2395
if flag(debug)
0 commit comments