Skip to content
This repository was archived by the owner on Oct 7, 2020. It is now read-only.

Commit e45ea11

Browse files
committed
Use Cabal version in CPP conditions instead GHC
1 parent bf3ce50 commit e45ea11

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

Diff for: src/Haskell/Ide/Engine/Plugin/Package.hs

+3-2
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,8 @@ import qualified Data.Text.Encoding as T
2727
import Data.Maybe
2828
#if __GLASGOW_HASKELL__ < 808
2929
import Data.Monoid ((<>))
30-
#else
30+
#endif
31+
#if MIN_VERSION_Cabal(3,0,0)
3132
import qualified Data.Set as S
3233
#endif
3334
#if MIN_VERSION_Cabal(2,2,0)
@@ -301,7 +302,7 @@ editCabalPackage file modulePath pkgName fileMap = do
301302
-- Add it to the bottom of the dependencies list
302303
-- TODO: we could sort the depencies and then insert it,
303304
-- or insert it in order iff the list is already sorted.
304-
#if __GLASGOW_HASKELL__ >= 808
305+
#if MIN_VERSION_Cabal(3,0,0)
305306
newDeps = oldDeps ++ [Dependency (mkPackageName (T.unpack dep)) anyVersion S.empty]
306307
#else
307308
newDeps = oldDeps ++ [Dependency (mkPackageName (T.unpack dep)) anyVersion]

0 commit comments

Comments
 (0)