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.
This commit is contained in:
Ryan Scott 2024-04-23 07:01:09 -04:00
parent 3e9ce9bfaf
commit 5e6b2c10b3

View File

@ -18,12 +18,17 @@ spec = do
describe "Data Version instance" $
it "allows obtaining a Version constructor" $
dataTypeName (dataTypeOf (Version [1,2,3] [])) `shouldBe`
-- Some old versions of GHC incorrectly return "Version" instead of
-- "Data.Version.Version" due to
-- https://gitlab.haskell.org/ghc/ghc/-/issues/20371.
#if __GLASGOW_HASKELL__ >= 801 && __GLASGOW_HASKELL__ < 903
-- Some old versions of GHC incorrectly return "Version" due to
-- https://gitlab.haskell.org/ghc/ghc/-/issues/20371.
"Version"
#elif __GLASGOW_HASKELL__ >= 910
-- In GHC 9.10 and later, Version is defined in
-- GHC.Internal.Data.Version (in the ghc-internal library).
"GHC.Internal.Data.Version.Version"
#else
-- In older versions of GHC, Version is defined in Data.Version (in the
-- base library).
"Data.Version.Version"
#endif