-
Notifications
You must be signed in to change notification settings - Fork 696
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #4751 from phadej/common-stanzas
RFC: Common stanzas
- Loading branch information
Showing
22 changed files
with
528 additions
and
34 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -29,6 +29,7 @@ | |
* Support for building with Win32 version 2.6 (#4835). | ||
* Compilation with section splitting is now supported via the | ||
'--enable-split-sections' flag (#4819) | ||
* Support for common stanzas (#4751) | ||
* TODO | ||
|
||
2.0.1.1 Mikhail Glushenkov <[email protected]> December 2017 | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
name: common | ||
version: 0 | ||
synopsis: Common-stanza demo demo | ||
build-type: Simple | ||
cabal-version: >=2.1 | ||
|
||
source-repository head | ||
Type: git | ||
Location: https://github.com/hvr/-.git | ||
|
||
common windows | ||
if os(windows) | ||
build-depends: Win32 | ||
|
||
-- Non-existing common stanza | ||
common deps | ||
import: windo | ||
build-depends: | ||
base >=4.10 && <4.11, | ||
containers | ||
|
||
library | ||
import: deps | ||
|
||
default-language: Haskell2010 | ||
exposed-modules: ElseIf | ||
|
||
build-depends: | ||
ghc-prim |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
PError (Position 17 3) "Undefined common stanza imported: windo" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
name: common | ||
version: 0 | ||
synopsis: Common-stanza demo demo | ||
build-type: Simple | ||
cabal-version: >=2.1 | ||
|
||
source-repository head | ||
Type: git | ||
Location: https://github.com/hvr/-.git | ||
|
||
-- Used before use | ||
common deps | ||
import: windows | ||
build-depends: | ||
base >=4.10 && <4.11, | ||
containers | ||
|
||
common windows | ||
if os(windows) | ||
build-depends: Win32 | ||
|
||
library | ||
import: deps | ||
|
||
default-language: Haskell2010 | ||
exposed-modules: ElseIf | ||
|
||
build-depends: | ||
ghc-prim |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
PError (Position 13 3) "Undefined common stanza imported: windows" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
name: common | ||
version: 0 | ||
synopsis: Common-stanza demo demo | ||
build-type: Simple | ||
cabal-version: >=2.1 | ||
|
||
source-repository head | ||
Type: git | ||
Location: https://github.com/hvr/-.git | ||
|
||
common windows | ||
if os(windows) | ||
build-depends: Win32 | ||
|
||
common deps | ||
import: windows | ||
build-depends: | ||
base >=4.10 && <4.11, | ||
containers | ||
|
||
-- Duplicate | ||
common deps | ||
|
||
library | ||
import: deps | ||
|
||
default-language: Haskell2010 | ||
exposed-modules: ElseIf | ||
|
||
build-depends: | ||
ghc-prim |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
PError (Position 22 1) "Duplicate common stanza: deps" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
name: common | ||
version: 0 | ||
synopsis: Common-stanza demo demo | ||
build-type: Simple | ||
cabal-version: >=1.10 | ||
|
||
source-repository head | ||
Type: git | ||
Location: https://github.com/hvr/-.git | ||
|
||
common deps | ||
build-depends: | ||
base >=4.10 && <4.11, | ||
containers | ||
|
||
library | ||
import: deps | ||
|
||
default-language: Haskell2010 | ||
exposed-modules: ElseIf | ||
|
||
build-depends: | ||
ghc-prim | ||
|
||
test-suite tests | ||
import: deps | ||
|
||
type: exitcode-stdio-1.0 | ||
main-is: Tests.hs | ||
|
||
build-depends: | ||
HUnit |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
PWarning PWTUnknownField (Position 26 3) "Unknown field: import. You should set cabal-version: 2.2 or larger to use common stanzas" | ||
PWarning PWTUnknownField (Position 17 3) "Unknown field: import. You should set cabal-version: 2.2 or larger to use common stanzas" | ||
PWarning PWTUnknownSection (Position 11 1) "Ignoring section: common. You should set cabal-version: 2.2 or larger to use common stanzas." | ||
name: common | ||
version: 0 | ||
synopsis: Common-stanza demo demo | ||
cabal-version: >=1.10 | ||
build-type: Simple | ||
|
||
source-repository head | ||
type: git | ||
location: https://github.com/hvr/-.git | ||
|
||
library | ||
exposed-modules: | ||
ElseIf | ||
default-language: Haskell2010 | ||
build-depends: | ||
ghc-prim -any | ||
|
||
test-suite tests | ||
type: exitcode-stdio-1.0 | ||
main-is: Tests.hs | ||
build-depends: | ||
HUnit -any |
Oops, something went wrong.