Skip to content

Commit

Permalink
pkg: rename terminfo flag, drop pretty-show conditionals
Browse files Browse the repository at this point in the history
  • Loading branch information
simonmichael committed Aug 9, 2016
1 parent 9ad7f2f commit c3b7622
Show file tree
Hide file tree
Showing 6 changed files with 28 additions and 54 deletions.
15 changes: 6 additions & 9 deletions hledger-lib/hledger-lib.cabal
Original file line number Diff line number Diff line change
Expand Up @@ -68,10 +68,11 @@ library
, deepseq
, directory
, filepath
, megaparsec >=5
, mtl
, mtl-compat
, old-time
, megaparsec >=5
, pretty-show >=1.6.4
, regex-tdfa
, safe >=0.2
, split >=0.1 && <0.3
Expand All @@ -82,9 +83,6 @@ library
, HUnit
, parsec
, semigroups
if impl(ghc >=7.4)
build-depends:
pretty-show >=1.6.4
if flag(oldtime)
build-depends:
time <1.5
Expand Down Expand Up @@ -157,10 +155,11 @@ test-suite doctests
, deepseq
, directory
, filepath
, megaparsec >=5
, mtl
, mtl-compat
, old-time
, megaparsec >=5
, pretty-show >=1.6.4
, regex-tdfa
, safe >=0.2
, split >=0.1 && <0.3
Expand Down Expand Up @@ -193,10 +192,11 @@ test-suite hunittests
, deepseq
, directory
, filepath
, megaparsec >=5
, mtl
, mtl-compat
, old-time
, megaparsec >=5
, pretty-show >=1.6.4
, regex-tdfa
, safe >=0.2
, split >=0.1 && <0.3
Expand All @@ -208,9 +208,6 @@ test-suite hunittests
, hledger-lib
, test-framework
, test-framework-hunit
if impl(ghc >=7.4)
build-depends:
pretty-show >=1.6.4
if flag(oldtime)
build-depends:
time <1.5
Expand Down
9 changes: 2 additions & 7 deletions hledger-lib/package.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -52,10 +52,11 @@ dependencies:
- deepseq
- directory
- filepath
- megaparsec >=5
- mtl
- mtl-compat
- old-time
- megaparsec >=5
- pretty-show >=1.6.4
- regex-tdfa
- safe >=0.2
- split >=0.1 && <0.3
Expand Down Expand Up @@ -117,9 +118,6 @@ library:
- parsec
- semigroups
when:
- condition: impl(ghc >=7.4)
dependencies:
- pretty-show >=1.6.4
- condition: flag(oldtime)
then:
dependencies:
Expand All @@ -143,9 +141,6 @@ tests:
- test-framework
- test-framework-hunit
when:
- condition: impl(ghc >=7.4)
dependencies:
- pretty-show >=1.6.4
- condition: flag(oldtime)
then:
dependencies:
Expand Down
4 changes: 1 addition & 3 deletions hledger-ui/hledger-ui.cabal
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,7 @@ executable hledger-ui
, microlens >= 0.4 && < 0.5
, microlens-platform >= 0.2.3.1 && < 0.4
, megaparsec >= 5
, pretty-show >=1.6.4
, process >= 1.2
, safe >= 0.2
, split >= 0.1 && < 0.3
Expand All @@ -92,9 +93,6 @@ executable hledger-ui
else
build-depends:
time >= 1.5
if impl(ghc >= 7.4)
build-depends:
pretty-show >= 1.6.4
other-modules:
Hledger.UI
Hledger.UI.AccountsScreen
Expand Down
4 changes: 1 addition & 3 deletions hledger-ui/package.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,7 @@ executables:
- microlens >= 0.4 && < 0.5
- microlens-platform >= 0.2.3.1 && < 0.4
- megaparsec >= 5
- pretty-show >=1.6.4
- process >= 1.2
- safe >= 0.2
- split >= 0.1 && < 0.3
Expand All @@ -96,8 +97,5 @@ executables:
else:
dependencies:
- time >= 1.5
- condition: impl(ghc >= 7.4)
dependencies:
- pretty-show >= 1.6.4
stability : beta
tested-with : GHC==7.8.4, GHC==7.10.3, GHC==8.0
29 changes: 12 additions & 17 deletions hledger/hledger.cabal
Original file line number Diff line number Diff line change
Expand Up @@ -63,16 +63,16 @@ source-repository head
type: git
location: https://github.com/simonmichael/hledger

flag curses
default: True
description: On POSIX systems, enable curses support for auto-detecting terminal width.
manual: False

flag oldtime
description: If building with time < 1.5, also depend on old-locale. Set automatically by cabal.
manual: False
default: False

flag terminfo
description: On POSIX systems, build with the terminfo lib for detecting terminal width.
manual: False
default: True

flag threaded
default: True
description: Build with support for multithreaded execution
Expand All @@ -87,6 +87,7 @@ library
, directory
, file-embed >=0.0.10 && <0.1
, filepath
, pretty-show >=1.6.4
, process
, temporary
, tabular >=0.2 && <0.3
Expand Down Expand Up @@ -124,10 +125,7 @@ library
else
build-depends:
time >=1.5
if impl(ghc >=7.4)
build-depends:
pretty-show >=1.6.4
if (!(os(windows))) && (flag(curses))
if (!(os(windows))) && (flag(terminfo))
build-depends:
terminfo
exposed-modules:
Expand Down Expand Up @@ -168,6 +166,7 @@ executable hledger
, directory
, file-embed >=0.0.10 && <0.1
, filepath
, pretty-show >=1.6.4
, process
, temporary
, tabular >=0.2 && <0.3
Expand Down Expand Up @@ -207,10 +206,7 @@ executable hledger
else
build-depends:
time >=1.5
if impl(ghc >=7.4)
build-depends:
pretty-show >=1.6.4
if (!(os(windows))) && (flag(curses))
if (!(os(windows))) && (flag(terminfo))
build-depends:
terminfo
default-language: Haskell2010
Expand All @@ -228,6 +224,7 @@ test-suite test
, directory
, file-embed >=0.0.10 && <0.1
, filepath
, pretty-show >=1.6.4
, process
, temporary
, tabular >=0.2 && <0.3
Expand Down Expand Up @@ -260,17 +257,14 @@ test-suite test
build-depends:
shakespeare >=1.0 && <2.1
, shakespeare-text >=1.0 && <1.2
if impl(ghc >=7.4)
build-depends:
pretty-show >=1.6.4
if flag(oldtime)
build-depends:
time <1.5
, oldtime
else
build-depends:
time >=1.5
if (!(os(windows))) && (flag(curses))
if (!(os(windows))) && (flag(terminfo))
build-depends:
terminfo
default-language: Haskell2010
Expand All @@ -290,6 +284,7 @@ benchmark bench
, directory
, file-embed >=0.0.10 && <0.1
, filepath
, pretty-show >=1.6.4
, process
, temporary
, tabular >=0.2 && <0.3
Expand Down
21 changes: 6 additions & 15 deletions hledger/package.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -50,9 +50,8 @@ data-files:
- doc/other/hledger_timedot.5.txt
- doc/other/hledger_timedot.5.info
flags:
curses:
description: On POSIX systems, enable curses support for auto-detecting terminal
width.
terminfo:
description: On POSIX systems, build with the terminfo lib for detecting terminal width.
manual: false
default: true
threaded:
Expand All @@ -69,6 +68,7 @@ dependencies:
- directory
- file-embed >=0.0.10 && <0.1
- filepath
- pretty-show >=1.6.4
- process
- temporary
- tabular >=0.2 && <0.3
Expand Down Expand Up @@ -141,10 +141,7 @@ library:
else:
dependencies:
- time >=1.5
- condition: impl(ghc >=7.4)
dependencies:
- pretty-show >=1.6.4
- condition: (!(os(windows))) && (flag(curses))
- condition: (!(os(windows))) && (flag(terminfo))
dependencies:
- terminfo
executables:
Expand Down Expand Up @@ -192,10 +189,7 @@ executables:
else:
dependencies:
- time >=1.5
- condition: impl(ghc >=7.4)
dependencies:
- pretty-show >=1.6.4
- condition: (!(os(windows))) && (flag(curses))
- condition: (!(os(windows))) && (flag(terminfo))
dependencies:
- terminfo
tests:
Expand Down Expand Up @@ -235,9 +229,6 @@ tests:
dependencies:
- shakespeare >=1.0 && <2.1
- shakespeare-text >=1.0 && <1.2
- condition: impl(ghc >=7.4)
dependencies:
- pretty-show >=1.6.4
- condition: flag(oldtime)
then:
dependencies:
Expand All @@ -246,7 +237,7 @@ tests:
else:
dependencies:
- time >=1.5
- condition: (!(os(windows))) && (flag(curses))
- condition: (!(os(windows))) && (flag(terminfo))
dependencies:
- terminfo
benchmarks:
Expand Down

0 comments on commit c3b7622

Please sign in to comment.