[Git][ghc/ghc][master] ghc-internal: delete Version hs-boot loop
Marge Bot pushed to branch master at Glasgow Haskell Compiler / GHC Commits: d29800e0 by Teo Camarasu at 2026-03-06T06:28:46-05:00 ghc-internal: delete Version hs-boot loop Version has a Read instance which needs Unicode but part of the Unicode interface is the unicode version. This is easy to resolve. We simply don't re-export the version from the Unicode module. Resolves #26940 - - - - - 6 changed files: - libraries/base/src/GHC/Unicode.hs - libraries/ghc-internal/ghc-internal.cabal.in - − libraries/ghc-internal/src/GHC/Internal/Data/Version.hs-boot - libraries/ghc-internal/src/GHC/Internal/Unicode.hs - libraries/ghc-internal/src/GHC/Internal/Unicode/Version.hs - libraries/ghc-internal/tools/ucd2haskell/exe/UCD2Haskell/ModuleGenerators.hs Changes: ===================================== libraries/base/src/GHC/Unicode.hs ===================================== @@ -44,3 +44,4 @@ module GHC.Unicode ) where import GHC.Internal.Unicode +import GHC.Internal.Unicode.Version ===================================== libraries/ghc-internal/ghc-internal.cabal.in ===================================== @@ -316,6 +316,7 @@ Library GHC.Internal.TypeNats GHC.Internal.TypeNats.Internal GHC.Internal.Unicode + GHC.Internal.Unicode.Version GHC.Internal.Weak GHC.Internal.Weak.Finalize GHC.Internal.Word @@ -381,7 +382,6 @@ Library GHC.Internal.Unicode.Char.UnicodeData.SimpleLowerCaseMapping GHC.Internal.Unicode.Char.UnicodeData.SimpleTitleCaseMapping GHC.Internal.Unicode.Char.UnicodeData.SimpleUpperCaseMapping - GHC.Internal.Unicode.Version GHC.Internal.System.Environment.ExecutablePath ===================================== libraries/ghc-internal/src/GHC/Internal/Data/Version.hs-boot deleted ===================================== @@ -1,20 +0,0 @@ -{-# LANGUAGE NoImplicitPrelude #-} - -module GHC.Internal.Data.Version - ( Version - , makeVersion - ) where - -import GHC.Internal.Types - - --- The generated module GHC.Internal.Unicode.Version depends on --- GHC.Internal.Base.build via built-in list syntax, and its only --- import is this hs-boot file, so until someone fixes the generator, --- this import has to stay here to ensure sound build ordering. See also --- W1 of Note [Tracking dependencies on primitives] in GHC.Internal.Base. -import GHC.Internal.Base () - -data Version - -makeVersion :: [Int] -> Version ===================================== libraries/ghc-internal/src/GHC/Internal/Unicode.hs ===================================== @@ -20,7 +20,6 @@ ----------------------------------------------------------------------------- module GHC.Internal.Unicode ( - unicodeVersion, GeneralCategory (..), generalCategory, isAscii, isLatin1, isControl, isAsciiUpper, isAsciiLower, @@ -36,7 +35,6 @@ import GHC.Internal.Real import GHC.Internal.Enum ( Enum (..), Bounded (..) ) import GHC.Internal.Ix ( Ix (..) ) import GHC.Internal.Num -import GHC.Internal.Unicode.Version import qualified GHC.Internal.Unicode.Char.DerivedCoreProperties as DCP import qualified GHC.Internal.Unicode.Char.UnicodeData.GeneralCategory as GC import qualified GHC.Internal.Unicode.Char.UnicodeData.SimpleLowerCaseMapping as C ===================================== libraries/ghc-internal/src/GHC/Internal/Unicode/Version.hs ===================================== @@ -15,7 +15,7 @@ module GHC.Internal.Unicode.Version (unicodeVersion) where -import {-# SOURCE #-} GHC.Internal.Data.Version +import GHC.Internal.Data.Version -- | Version of Unicode standard used by @base@: -- [17.0.0](https://www.unicode.org/versions/Unicode17.0.0/). ===================================== libraries/ghc-internal/tools/ucd2haskell/exe/UCD2Haskell/ModuleGenerators.hs ===================================== @@ -144,7 +144,7 @@ genUnicodeVersion outdir = do , "(unicodeVersion)" , "where" , "" - , "import {-# SOURCE #-} GHC.Internal.Data.Version" + , "import GHC.Internal.Data.Version" , "" , "-- | Version of Unicode standard used by @base@:" , "-- [" <> BB.string7 version <> "](https://www.unicode.org/versions/Unicode" <> BB.string7 version <> "/)." View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/commit/d29800e0b2386191c8ba9c1fb975f804... -- View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/commit/d29800e0b2386191c8ba9c1fb975f804... You're receiving this email because of your account on gitlab.haskell.org.
participants (1)
-
Marge Bot (@marge-bot)