[Git][ghc/ghc][master] Remove explicit Typeable deriviations.
Marge Bot pushed to branch master at Glasgow Haskell Compiler / GHC Commits: 0b54b5fd by Andreas Klebinger at 2025-12-13T05:04:38-05:00 Remove explicit Typeable deriviations. - - - - - 10 changed files: - hadrian/src/Hadrian/Haskell/Cabal/Type.hs - hadrian/src/Hadrian/Haskell/Hash.hs - hadrian/src/Hadrian/Oracles/ArgsHash.hs - hadrian/src/Hadrian/Oracles/Cabal/Type.hs - hadrian/src/Hadrian/Oracles/DirectoryContents.hs - hadrian/src/Hadrian/Oracles/Path.hs - hadrian/src/Hadrian/Oracles/TextFile.hs - hadrian/src/Hadrian/Utilities.hs - hadrian/src/Oracles/Flavour.hs - hadrian/src/Oracles/ModuleFiles.hs Changes: ===================================== hadrian/src/Hadrian/Haskell/Cabal/Type.hs ===================================== @@ -31,7 +31,7 @@ data PackageData = PackageData , description :: String , packageDependencies :: [Package] , genericPackageDescription :: GenericPackageDescription - } deriving (Eq, Generic, Show, Typeable) + } deriving (Eq, Generic, Show) -- | Haskell package metadata obtained after resolving package configuration -- flags and associated conditionals according to the current build context. @@ -75,7 +75,7 @@ data ContextData = ContextData , contextLibdir :: FilePath -- The location where dynamic libraries go , contextDynLibdir :: FilePath - } deriving (Eq, Generic, Show, Typeable) + } deriving (Eq, Generic, Show) instance Binary PackageData instance Hashable PackageData where hashWithSalt salt = hashWithSalt salt . show ===================================== hadrian/src/Hadrian/Haskell/Hash.hs ===================================== @@ -108,7 +108,7 @@ data PackageHashConfigInputs = PackageHashConfigInputs { deriving Show newtype PkgHashKey = PkgHashKey (Stage, Package) - deriving (Binary, Eq, Hashable, NFData, Show, Typeable) + deriving (Binary, Eq, Hashable, NFData, Show) type instance RuleResult PkgHashKey = String pkgHash :: Stage -> Package -> Action String ===================================== hadrian/src/Hadrian/Oracles/ArgsHash.hs ===================================== @@ -38,7 +38,7 @@ trackArgsHash t = do void (askOracle $ ArgsHash hashedTarget :: Action Int) newtype ArgsHash c b = ArgsHash (Target c b) - deriving (Binary, Eq, Hashable, NFData, Show, Typeable) + deriving (Binary, Eq, Hashable, NFData, Show) type instance RuleResult (ArgsHash c b) = Int -- | This oracle stores per-target argument list hashes in the Shake database, ===================================== hadrian/src/Hadrian/Oracles/Cabal/Type.hs ===================================== @@ -26,13 +26,13 @@ import Stage -- | This type of oracle key is used by 'Hadrian.Oracles.Cabal.readPackageData' -- to cache reading and parsing of 'Hadrian.Haskell.Cabal.Type.PackageData'. newtype PackageDataKey = PackageDataKey Package - deriving (Binary, Eq, Hashable, NFData, Show, Typeable) + deriving (Binary, Eq, Hashable, NFData, Show) type instance RuleResult PackageDataKey = PackageData -- | This type of oracle key is used by 'Hadrian.Oracles.Cabal.readContextData' -- to cache reading and parsing of 'Hadrian.Haskell.Cabal.Type.ContextData'. newtype ContextDataKey = ContextDataKey Context - deriving (Binary, Eq, Hashable, NFData, Show, Typeable) + deriving (Binary, Eq, Hashable, NFData, Show) type instance RuleResult ContextDataKey = ContextData -- TODO: Should @PackageConfiguration@ be simply @()@? Presumably the pair @@ -40,7 +40,7 @@ type instance RuleResult ContextDataKey = ContextData -- | The result of Cabal package configuration produced by the oracle -- 'Hadrian.Oracles.Cabal.configurePackageGHC'. newtype PackageConfiguration = PackageConfiguration (C.Compiler, C.Platform) - deriving (Binary, Eq, Show, Typeable) + deriving (Binary, Eq, Show) instance NFData PackageConfiguration where rnf (PackageConfiguration (c, p)) = @@ -58,5 +58,5 @@ instance Hashable PackageConfiguration where -- | This type of oracle key is used by 'Hadrian.Oracles.Cabal.configurePackageGHC' -- to cache configuration of a Cabal package. newtype PackageConfigurationKey = PackageConfigurationKey (Package, Stage) - deriving (Binary, Eq, Hashable, NFData, Show, Typeable) + deriving (Binary, Eq, Hashable, NFData, Show) type instance RuleResult PackageConfigurationKey = PackageConfiguration ===================================== hadrian/src/Hadrian/Oracles/DirectoryContents.hs ===================================== @@ -15,7 +15,7 @@ import Hadrian.Utilities import qualified System.Directory.Extra as IO data Match = Test FilePattern | Not Match | And [Match] | Or [Match] - deriving (Generic, Eq, Show, Typeable) + deriving (Generic, Eq, Show) instance Binary Match instance Hashable Match @@ -54,7 +54,7 @@ copyDirectoryContentsUntracked expr source target = do mapM_ cp =<< directoryContents expr source newtype DirectoryContents = DirectoryContents (Match, FilePath) - deriving (Binary, Eq, Hashable, NFData, Show, Typeable) + deriving (Binary, Eq, Hashable, NFData, Show) type instance RuleResult DirectoryContents = [FilePath] -- | This oracle answers 'directoryContents' queries and tracks the results. ===================================== hadrian/src/Hadrian/Oracles/Path.hs ===================================== @@ -34,11 +34,11 @@ fixAbsolutePathOnWindows path = return path newtype LookupInPath = LookupInPath String - deriving (Binary, Eq, Hashable, NFData, Show, Typeable) + deriving (Binary, Eq, Hashable, NFData, Show) type instance RuleResult LookupInPath = String newtype WindowsPath = WindowsPath FilePath - deriving (Binary, Eq, Hashable, NFData, Show, Typeable) + deriving (Binary, Eq, Hashable, NFData, Show) type instance RuleResult WindowsPath = String -- | Oracles for looking up paths. These are slow and require caching. ===================================== hadrian/src/Hadrian/Oracles/TextFile.hs ===================================== @@ -118,15 +118,15 @@ queryTargetTarget :: (Toolchain.Target -> a) -> Action a queryTargetTarget f = f <$> getTargetTarget newtype KeyValue = KeyValue (FilePath, String) - deriving (Binary, Eq, Hashable, NFData, Show, Typeable) + deriving (Binary, Eq, Hashable, NFData, Show) type instance RuleResult KeyValue = Maybe String newtype KeyValues = KeyValues (FilePath, String) - deriving (Binary, Eq, Hashable, NFData, Show, Typeable) + deriving (Binary, Eq, Hashable, NFData, Show) type instance RuleResult KeyValues = Maybe [String] newtype TargetFile = TargetFile FilePath - deriving (Binary, Eq, Hashable, NFData, Show, Typeable) + deriving (Binary, Eq, Hashable, NFData, Show) type instance RuleResult TargetFile = Toolchain.Target -- | These oracle rules are used to cache and track answers to the following ===================================== hadrian/src/Hadrian/Utilities.hs ===================================== @@ -298,7 +298,7 @@ userSettingRules defaultValue = do extra <- shakeExtra <$> getShakeOptionsRules return $ lookupExtra defaultValue extra -newtype BuildRoot = BuildRoot FilePath deriving (Typeable, Eq, Show) +newtype BuildRoot = BuildRoot FilePath deriving (Eq, Show) -- | All build results are put into the 'buildRoot' directory. buildRoot :: Action FilePath @@ -484,7 +484,6 @@ putColoured code msg = do else putInfo msg newtype BuildProgressColour = BuildProgressColour String - deriving Typeable -- | By default, Hadrian tries to figure out if the current terminal -- supports colors using this function. The default can be overridden @@ -511,7 +510,6 @@ putBuild msg = do putColoured code msg newtype SuccessColour = SuccessColour String - deriving Typeable -- | Generate an encoded colour for successful output from names mkSuccessColour :: Colour -> SuccessColour @@ -528,7 +526,6 @@ putSuccess msg = do putColoured code msg newtype FailureColour = FailureColour String - deriving Typeable -- | Generate an encoded colour for failure output messages mkFailureColour :: Colour -> FailureColour @@ -544,7 +541,7 @@ putFailure msg = do FailureColour code <- userSetting red putColoured code msg -data ProgressInfo = None | Brief | Normal | Unicorn deriving (Eq, Show, Typeable) +data ProgressInfo = None | Brief | Normal | Unicorn deriving (Eq, Show) -- | Version of 'putBuild' controlled by @--progress-info@ command line argument. putProgressInfo :: String -> Action () ===================================== hadrian/src/Oracles/Flavour.hs ===================================== @@ -14,11 +14,11 @@ import Flavour import Settings (flavour) newtype DynGhcPrograms = - DynGhcPrograms () deriving (Show, Typeable, Eq, Hashable, Binary, NFData) + DynGhcPrograms () deriving (Show, Eq, Hashable, Binary, NFData) type instance RuleResult DynGhcPrograms = Bool newtype GhcProfiled = - GhcProfiled Stage deriving (Show, Typeable, Eq, Hashable, Binary, NFData) + GhcProfiled Stage deriving (Show, Eq, Hashable, Binary, NFData) type instance RuleResult GhcProfiled = Bool oracles :: Rules () ===================================== hadrian/src/Oracles/ModuleFiles.hs ===================================== @@ -16,11 +16,11 @@ import Expression type ModuleName = String newtype ModuleFiles = ModuleFiles (Stage, Package) - deriving (Binary, Eq, Hashable, NFData, Show, Typeable) + deriving (Binary, Eq, Hashable, NFData, Show) type instance RuleResult ModuleFiles = [Maybe FilePath] newtype Generator = Generator (Stage, Package, FilePath) - deriving (Binary, Eq, Hashable, NFData, Show, Typeable) + deriving (Binary, Eq, Hashable, NFData, Show) type instance RuleResult Generator = Maybe FilePath -- | We scan for the following Haskell source extensions when looking for module View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/commit/0b54b5fde1c2fcc86a1d6180fa78c6ba... -- View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/commit/0b54b5fde1c2fcc86a1d6180fa78c6ba... You're receiving this email because of your account on gitlab.haskell.org.
participants (1)
-
Marge Bot (@marge-bot)