Skip to content

Commit 6971ed8

Browse files
ulysses4evergeekosaur
authored andcommitted
GHC 9.14 compat: replace async with text in a test for haddock-project
the test was using async from hackage as an exmaple global package. Currently, async has a too restrictive upper bound on base. It'll be more robust to rely on a boot package instead. Ideally we'd not rely on anything from Hackage in tests, but that's an issue for another day.
1 parent 2c1e577 commit 6971ed8

File tree

4 files changed

+6
-6
lines changed

4 files changed

+6
-6
lines changed

cabal-install/tests/IntegrationTests2.hs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2811,7 +2811,7 @@ testHaddockProjectDependencies config = do
28112811
["all"]
28122812
defaultGlobalFlags{globalStoreDir = Flag "store"}
28132813

2814-
let haddock = "haddocks" </> "async" </> "async.haddock"
2814+
let haddock = "haddocks" </> "text" </> "text.haddock"
28152815
hasHaddock <- doesFileExist haddock
28162816
unless hasHaddock $ assertFailure ("File `" ++ haddock ++ "` does not exist.")
28172817
cleanHaddockProject testdir

cabal-install/tests/IntegrationTests2/haddock-project/dependencies/a.cabal

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,6 @@ cabal-version: >= 1.10
55

66
library
77
exposed-modules: MyLib
8-
build-depends: base, async
8+
build-depends: base, text
99
hs-source-dirs: src
1010
default-language: Haskell2010

cabal-install/tests/IntegrationTests2/haddock-project/dependencies/cabal.project

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,5 +4,5 @@ jobs: 1
44

55
documentation: True
66

7-
package async
7+
package text
88
documentation: True
Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
module MyLib (someFunc) where
22

3-
import Control.Concurrent.Async
3+
import qualified Data.Text as T
44

5-
someFunc :: IO (Async ())
6-
someFunc = async (return ())
5+
someFunc :: IO ()
6+
someFunc = print . T.unpack . T.pack $ "Hello, World!"

0 commit comments

Comments
 (0)