Skip to content

Commit 5035db1

Browse files
committed
Fix #4, fix #7: require regex-posix-clib under windows directly
The current solution, to lead the absence of flag _regex-posix-clib under os(windows) to absurdity (base<0) is not handled correctly by stack.
1 parent 8802544 commit 5035db1

File tree

1 file changed

+4
-7
lines changed

1 file changed

+4
-7
lines changed

regex-posix.cabal

Lines changed: 4 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ source-repository this
5151
flag _regex-posix-clib
5252
manual: False
5353
default: False
54-
description: Use <//hackage.haskell.org/package/regex-posix-clib regex-posix-clib> package
54+
description: Use <//hackage.haskell.org/package/regex-posix-clib regex-posix-clib> package (used by default on Windows)
5555

5656
library
5757
hs-source-dirs: src
@@ -69,13 +69,10 @@ library
6969
c-sources: cbits/myfree.c
7070
include-dirs: cbits
7171

72-
if flag(_regex-posix-clib)
72+
if flag(_regex-posix-clib) || os(windows)
7373
build-depends: regex-posix-clib == 2.7.*
74-
else
75-
-- use POSIX.2 regex implementation from @libc@
76-
-- However, Windows/msys2 doesn't provide a POSIX.2 regex impl in its @libc@
77-
if os(windows)
78-
build-depends: base<0
74+
-- Otherwise, use POSIX.2 regex implementation from @libc@.
75+
-- However, Windows/msys2 doesn't provide a POSIX.2 regex impl in its @libc@.
7976

8077
default-language: Haskell2010
8178
default-extensions:

0 commit comments

Comments
 (0)