Skip to content

Commit

Permalink
GHC 9.6 compatibility
Browse files Browse the repository at this point in the history
- -XTypeInType is deprecated
- skip failing JS test on Windows
  Cf. #8754 (comment)
- deal with lift2A in Prelude since base-4.18 (GHC 9.6)
- disable everfailing Backpack tests
  • Loading branch information
ulysses4ever authored and mergify[bot] committed Feb 23, 2023
1 parent 9e417fa commit 87ac120
Show file tree
Hide file tree
Showing 6 changed files with 8 additions and 4 deletions.
1 change: 0 additions & 1 deletion Cabal-syntax/src/Distribution/Utils/Structured.hs
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@
{-# LANGUAGE TypeFamilies #-}
{-# LANGUAGE TypeOperators #-}
{-# LANGUAGE PatternSynonyms #-}
{-# LANGUAGE TypeInType #-}
-- |
--
-- Copyright: (c) 2019 Oleg Grenrus
Expand Down
4 changes: 4 additions & 0 deletions cabal-install/src/Distribution/Client/VCS.hs
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
{-# LANGUAGE CPP #-}
{-# LANGUAGE LambdaCase #-}
{-# LANGUAGE ScopedTypeVariables #-}
{-# LANGUAGE NamedFieldPuns, RecordWildCards, RankNTypes #-}
Expand Down Expand Up @@ -53,8 +54,11 @@ import Distribution.Version
( mkVersion )
import qualified Distribution.PackageDescription as PD

#if !MIN_VERSION_base(4,18,0)
import Control.Applicative
( liftA2 )
#endif

import Control.Exception
( throw, try )
import Control.Monad.Trans
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import Test.Cabal.Prelude
main = setupAndCabalTest $ do
skipUnlessGhcVersion ">= 8.1"
ghc <- isGhcVersion "== 9.0.2 || == 9.2.* || == 9.4.*"
ghc <- isGhcVersion "== 9.0.2 || == 9.2.* || == 9.4.* || == 9.6.*"
expectBrokenIf ghc 7987 $ do
withPackageDb $ do
withDirectory "mylib" $ setup_install_with_docs ["--ipid", "mylib-0.1.0.0"]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import Test.Cabal.Prelude
main = setupTest $ do
-- No cabal test because per-component is broken with it
skipUnlessGhcVersion ">= 8.1"
ghc <- isGhcVersion "== 9.0.2 || == 9.2.* || == 9.4.*"
ghc <- isGhcVersion "== 9.0.2 || == 9.2.* || == 9.4.* || == 9.6.*"
expectBrokenIf ghc 7987 $
withPackageDb $ do
let setup_install' args = setup_install_with_docs (["--cabal-file", "Includes2.cabal"] ++ args)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import Data.List
import qualified Data.Char as Char
main = setupAndCabalTest $ do
skipUnlessGhcVersion ">= 8.1"
ghc <- isGhcVersion "== 9.0.2 || == 9.2.* || == 9.4.*"
ghc <- isGhcVersion "== 9.0.2 || == 9.2.* || == 9.4.* || == 9.6.*"
expectBrokenIf ghc 7987 $
withPackageDb $ do
containers_id <- getIPID "containers"
Expand Down
1 change: 1 addition & 0 deletions cabal-testsuite/PackageTests/JS/JsSources/js-arch.test.hs
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ import Test.Cabal.Prelude
main = setupAndCabalTest $ do
skipUnlessGhcVersion ">= 9.6"
skipUnlessJavaScript
skipIfWindows

res <- cabal' "v2-run" ["demo"]
assertOutputContains "Hello JS!" res

0 comments on commit 87ac120

Please sign in to comment.