Skip to content

Commit 40a48d6

Browse files
authored
Prohibit unbuildable Windows configurations due to GHC bugs wrt TemplateHaskell and C interaction (#404)
* Prohibit unbuildable Windows configurations due to GHC bugs wrt TemplateHaskell and C interaction * Put bounds inside impl
1 parent f021db6 commit 40a48d6

File tree

1 file changed

+11
-1
lines changed

1 file changed

+11
-1
lines changed

text.cabal

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -97,6 +97,15 @@ library
9797
else
9898
extra-libraries: stdc++
9999

100+
-- Certain version of GHC crash on Windows, when TemplateHaskell encounters C++.
101+
-- https://gitlab.haskell.org/ghc/ghc/-/issues/19417
102+
if flag(simdutf) && os(windows) && impl(ghc == 8.0.1 || >= 8.8 && < 8.10.5 || == 9.0.1)
103+
build-depends: base < 0
104+
105+
-- For GHC 8.2, 8.6.3 and 8.10.1 even TH + C crash Windows linker.
106+
if os(windows) && impl(ghc >= 8.2 && < 8.4 || == 8.6.3 || == 8.10.1)
107+
build-depends: base < 0
108+
100109
exposed-modules:
101110
Data.Text
102111
Data.Text.Array
@@ -229,7 +238,8 @@ test-suite tests
229238

230239
-- Starting from 9.2 ghc library depends on parsec,
231240
-- which causes circular dependency.
232-
if impl(ghc < 9.2)
241+
-- Plugin infrastructure does not work properly in 8.0.1 and 8.6.1
242+
if impl(ghc >= 8.0.2 && < 8.6 || >= 8.6.2 && < 9.2)
233243
build-depends: tasty-inspection-testing
234244

235245
default-language: Haskell2010

0 commit comments

Comments
 (0)