Skip to content

Commit

Permalink
Use flag to keep ansi-wl-pprint and optparse-applicative in sync (#447)
Browse files Browse the repository at this point in the history
  • Loading branch information
ysangkok authored Oct 16, 2023
1 parent 38a64c4 commit 0e64ca8
Showing 1 changed file with 15 additions and 2 deletions.
17 changes: 15 additions & 2 deletions turtle.cabal
Original file line number Diff line number Diff line change
Expand Up @@ -59,12 +59,16 @@ Source-Repository head
Type: git
Location: https://github.com/Gabriella439/turtle

Flag new-deps
Description: Use new versions of ansi-wl-pprint and optparse-applicative
Manual: False
Default: True

Library
HS-Source-Dirs: src
Build-Depends:
-- 2021-09-07: Turtle.Prelude uses GHC-8.0 features, so base >= 4.9
base >= 4.9 && < 5 ,
ansi-wl-pprint >= 0.6 && < 1.1 ,
async >= 2.0.0.0 && < 2.3 ,
bytestring >= 0.9.1.8 && < 0.12,
clock >= 0.4.1.2 && < 0.9 ,
Expand All @@ -82,14 +86,23 @@ Library
text >= 1.0.0 && < 2.1 ,
time < 1.13,
transformers >= 0.2.0.0 && < 0.7 ,
optparse-applicative >= 0.16 && < 0.19,
optional-args >= 1.0 && < 2.0 ,
unix-compat >= 0.4 && < 0.8
if os(windows)
Build-Depends: Win32 >= 2.12
else
Build-Depends: unix >= 2.5.1.0 && < 2.9

-- A possible Cabal issue makes it try an old version of ansi-wl-pprint
-- even though a newer would work.
-- See discussion in https://github.com/Gabriella439/turtle/pull/446
if flag(new-deps)
Build-Depends: ansi-wl-pprint >= 1.0 && < 1.1 ,
optparse-applicative >= 0.18 && < 0.19
else
Build-Depends: ansi-wl-pprint >= 0.6 && < 1.0 ,
optparse-applicative >= 0.16 && < 0.18

Exposed-Modules:
Turtle,
Turtle.Bytes,
Expand Down

0 comments on commit 0e64ca8

Please sign in to comment.