@@ -1353,6 +1353,15 @@ system-dependent values for these fields.
13531353 from the same package can be specified with the shorthand syntax
13541354 ``my-package:{my-library1,my-library2} ``.
13551355
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+
13561365 .. Note ::
13571366
13581367 Before version 3.4 of the Cabal specification, from version 2.0, a
@@ -2317,7 +2326,7 @@ Configurations
23172326
23182327Library and executable sections may include conditional blocks, which
23192328test 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
23212330certain feature, that can be switched on or off by the package user.
23222331Here is an example package description file using configurations:
23232332
@@ -2378,8 +2387,9 @@ Example: A package containing a library and executable programs
23782387
23792388 Executable test1
23802389 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
23832393 Default-Language: Haskell2010
23842394
23852395 if flag(debug)
0 commit comments