Skip to content

Commit 5e6b2c1

Browse files
committed
Tests: Update expected output for Version's Data instance with GHC 9.10+
In GHC 9.10, `Version`'s definition was moved from `Data.Version` (in `base`) to `GHC.Internal.Data.Version` (in `ghc-internal`), which causes its `Data` instance to change accordingly. The `base-orphans` test suite is sensitive to this difference, so let's update the expected output of the test suite as well. Fixes #70.
1 parent 3e9ce9b commit 5e6b2c1

File tree

1 file changed

+8
-3
lines changed

1 file changed

+8
-3
lines changed

test/Data/Version/OrphansSpec.hs

+8-3
Original file line numberDiff line numberDiff line change
@@ -18,12 +18,17 @@ spec = do
1818
describe "Data Version instance" $
1919
it "allows obtaining a Version constructor" $
2020
dataTypeName (dataTypeOf (Version [1,2,3] [])) `shouldBe`
21-
-- Some old versions of GHC incorrectly return "Version" instead of
22-
-- "Data.Version.Version" due to
23-
-- https://gitlab.haskell.org/ghc/ghc/-/issues/20371.
2421
#if __GLASGOW_HASKELL__ >= 801 && __GLASGOW_HASKELL__ < 903
22+
-- Some old versions of GHC incorrectly return "Version" due to
23+
-- https://gitlab.haskell.org/ghc/ghc/-/issues/20371.
2524
"Version"
25+
#elif __GLASGOW_HASKELL__ >= 910
26+
-- In GHC 9.10 and later, Version is defined in
27+
-- GHC.Internal.Data.Version (in the ghc-internal library).
28+
"GHC.Internal.Data.Version.Version"
2629
#else
30+
-- In older versions of GHC, Version is defined in Data.Version (in the
31+
-- base library).
2732
"Data.Version.Version"
2833
#endif
2934

0 commit comments

Comments
 (0)