diff --git a/Changelog b/Changelog index 8467aa3835c1a0b24bef9e8a0c80c33adcf6bd16..e36e09d0b9ea5290ebe5b3aa24fda00c416d746d 100644 --- a/Changelog +++ b/Changelog @@ -1,3 +1,6 @@ +Changed in version 0.8.0.1: + * Add a Cabal flag to disable the example executable as well as + the test that uses it. Changed in version 0.8.0.0: * Breaking changes: * Add a `MonadFail` instance for `InputT`. diff --git a/haskeline.cabal b/haskeline.cabal index 0b0ce1028697c94b38d7fd8143f139aa3742e691..d5c4419878adc2ce77b3c79122e6d6a4421758d9 100644 --- a/haskeline.cabal +++ b/haskeline.cabal @@ -1,6 +1,6 @@ Name: haskeline Cabal-Version: >=1.10 -Version: 0.8.0.0 +Version: 0.8.0.1 Category: User Interfaces License: BSD3 License-File: LICENSE @@ -38,6 +38,13 @@ flag terminfo Default: True Manual: True +-- Help the GHC build by making it possible to disable the extra binary. +-- TODO: Make GHC handle packages with both a library and an executable. +flag examples + Description: Enable executable components used for tests. + Default: True + Manual: True + Library -- We require ghc>=7.4.1 (base>=4.5) to use the base library encodings, even -- though it was implemented in earlier releases, due to GHC bug #5436 which @@ -117,8 +124,12 @@ test-suite haskeline-tests hs-source-dirs: tests Default-Language: Haskell98 - if os(windows) + if os(windows) { buildable: False + } + if !flag(examples) { + buildable: False + } Main-Is: Unit.hs Build-depends: base, containers, text, bytestring, HUnit, process, unix Other-Modules: RunTTY, Pty @@ -126,6 +137,9 @@ test-suite haskeline-tests -- The following program is used by unit tests in `tests` executable Executable haskeline-examples-Test + if !flag(examples) { + buildable: False + } Build-depends: base, containers, haskeline Default-Language: Haskell2010 hs-source-dirs: examples