Skip to content

Commit a617127

Browse files
authored
Add ghc-lib flag to force use ghc-lib-parser even if ghc is supported
1 parent 645acc4 commit a617127

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

stylish-haskell.cabal

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,12 @@ Extra-source-files:
2323
README.markdown,
2424
data/stylish-haskell.yaml
2525

26+
Flag ghc-lib
27+
Default: False
28+
Manual: True
29+
Description:
30+
Force dependency on ghc-lib-parser even if GHC API in the ghc package is supported
31+
2632
Common depends
2733
Ghc-options: -Wall
2834
Default-language: Haskell2010
@@ -46,7 +52,7 @@ Common depends
4652
Build-depends:
4753
semigroups >= 0.18 && < 0.20
4854

49-
if impl(ghc >= 9.2.2)
55+
if impl(ghc >= 9.2.2) && (!flag(ghc-lib))
5056
Build-depends:
5157
ghc >= 9.2 && < 9.3,
5258
ghc-boot,

0 commit comments

Comments
 (0)