Skip to content

Commit

Permalink
Use specific versions of fourmolu for each version of GHC
Browse files Browse the repository at this point in the history
  • Loading branch information
brandonchinn178 committed Aug 17, 2023
1 parent a20ffc6 commit cfc60fc
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion plugins/hls-fourmolu-plugin/hls-fourmolu-plugin.cabal
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,6 @@ library
build-depends:
, base >=4.12 && <5
, filepath
, fourmolu ^>= 0.9 || ^>= 0.10 || ^>= 0.11 || ^>= 0.12 || ^>= 0.13
, ghc
, ghc-boot-th
, ghcide == 2.1.0.0
Expand All @@ -43,6 +42,15 @@ library
, text
, transformers

if impl(ghc >= 8.10) && impl(ghc < 9.0)
build-depends: fourmolu ^>= 0.9
elif impl(ghc >= 9.0) && impl(ghc < 9.2)
build-depends: fourmolu ^>= 0.11
elif impl(ghc >= 9.2) && impl(ghc < 9.8)
build-depends: fourmolu ^>= 0.13
else
buildable: false

-- fourmolu 0.9.0 fails to build on Windows CI for reasons unknown
if impl(ghc >= 9.2) && os(windows) && impl(ghc < 9.4)
build-depends: fourmolu > 0.9.0.0 || < 0.9.0.0
Expand Down

0 comments on commit cfc60fc

Please sign in to comment.