[Git][ghc/ghc][wip/splice-imports-2025] Fix IsBoot instance

Matthew Pickering pushed to branch wip/splice-imports-2025 at Glasgow Haskell Compiler / GHC Commits: 1e1422c8 by Matthew Pickering at 2025-04-16T21:35:09+01:00 Fix IsBoot instance - - - - - 1 changed file: - compiler/GHC/Utils/Binary.hs Changes: ===================================== compiler/GHC/Utils/Binary.hs ===================================== @@ -1080,10 +1080,13 @@ instance Enum a => Binary (EnumBinary a) where deriving via (EnumBinary ImportLevel) instance Binary ImportLevel instance Binary IsBootInterface where - put_ bh IsBoot = put_ bh False - put_ bh NotBoot = put_ bh True + put_ bh ib = put_ bh (case ib of + IsBoot -> True + NotBoot -> False) get bh = do x <- get bh - return $ if x then IsBoot else NotBoot + return $ case x of + True -> IsBoot + False -> NotBoot {- Finally - a reasonable portable Integer instance. @@ -2161,4 +2164,4 @@ instance Binary a => Binary (FingerprintWithValue a) where instance NFData a => NFData (FingerprintWithValue a) where rnf (FingerprintWithValue fp mflags) - = rnf fp `seq` rnf mflags `seq` () \ No newline at end of file + = rnf fp `seq` rnf mflags `seq` () View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/commit/1e1422c8a8e163070028b4b064544e63... -- View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/commit/1e1422c8a8e163070028b4b064544e63... You're receiving this email because of your account on gitlab.haskell.org.
participants (1)
-
Matthew Pickering (@mpickering)