File tree 3 files changed +13
-3
lines changed
lib/Language/Haskell/Stylish/Config
3 files changed +13
-3
lines changed Original file line number Diff line number Diff line change 9
9
strategy :
10
10
matrix :
11
11
os : [ubuntu-latest, macOS-latest]
12
- ghc : ["9.6.6 ", "9.8", "9.10"]
12
+ ghc : ["9.6", "9.8", "9.10"]
13
13
14
14
steps :
15
15
- uses : actions/checkout@v4
Original file line number Diff line number Diff line change
1
+ {-# LANGUAGE CPP #-}
1
2
--------------------------------------------------------------------------------
2
3
module Language.Haskell.Stylish.Config.Cabal
3
4
( findLanguageExtensions
@@ -50,11 +51,20 @@ findCabalFile verbose configSearchStrategy = case configSearchStrategy of
50
51
verbose $ " Stylish Haskell will work basing on LANGUAGE pragmas in source files."
51
52
return Nothing
52
53
go searched (p : ps) = do
53
- let projectRoot = Just $ Cabal. makeSymbolicPath p
54
+
55
+ #if MIN_VERSION_Cabal(3,14,0)
56
+ let projectRoot = Just $ makeSymbolicPath p
54
57
potentialCabalFile <- Cabal. findPackageDesc projectRoot
58
+ #else
59
+ potentialCabalFile <- Cabal. findPackageDesc p
60
+ #endif
55
61
case potentialCabalFile of
56
62
Right cabalFile -> pure $ Just $
63
+ #if MIN_VERSION_Cabal(3,14,0)
57
64
Cabal. interpretSymbolicPath projectRoot cabalFile
65
+ #else
66
+ cabalFile
67
+ #endif
58
68
_ -> go (p : searched) ps
59
69
60
70
Original file line number Diff line number Diff line change @@ -39,7 +39,7 @@ Common depends
39
39
aeson >= 0.6 && < 2.3 ,
40
40
base >= 4.8 && < 5 ,
41
41
bytestring >= 0.9 && < 0.13 ,
42
- Cabal >= 3.14 && < 4.0 ,
42
+ Cabal >= 3.10 && < 4.0 ,
43
43
containers >= 0.3 && < 0.9 ,
44
44
directory >= 1.2.3 && < 1.4 ,
45
45
filepath >= 1.1 && < 1.6 ,
You can’t perform that action at this time.
0 commit comments