[Git][ghc/ghc][wip/romes/step-out-10] Apply 2 suggestion(s) to 2 file(s)
Rodrigo Mesquita pushed to branch wip/romes/step-out-10 at Glasgow Haskell Compiler / GHC Commits: 27645c84 by Rodrigo Mesquita at 2025-07-30T12:10:54+01:00 Apply 2 suggestion(s) to 2 file(s) Co-authored-by: Cheng Shao <terrorjack@type.dance> - - - - - 2 changed files: - compiler/GHC/ByteCode/Breakpoints.hs - compiler/GHC/Linker/Loader.hs Changes: ===================================== compiler/GHC/ByteCode/Breakpoints.hs ===================================== @@ -107,8 +107,8 @@ type BreakInfoIndex = Int -- Indexes into the structures in the @'InternalModBreaks'@ produced during ByteCode generation. -- See Note [Breakpoint identifiers] data InternalBreakpointId = InternalBreakpointId - { ibi_info_mod :: !Module -- ^ Breakpoint tick module - , ibi_info_index :: !BreakInfoIndex -- ^ Breakpoint tick index + { ibi_info_mod :: !Module -- ^ Breakpoint info module + , ibi_info_index :: !BreakInfoIndex -- ^ Breakpoint info index } deriving (Eq, Ord) ===================================== compiler/GHC/Linker/Loader.hs ===================================== @@ -1671,7 +1671,7 @@ allocateBreakArrays interp = ( \be0 InternalModBreaks{imodBreaks_breakInfo, imodBreaks_modBreaks=ModBreaks {..}} -> do -- If no BreakArray is assigned to this module yet, create one if not $ elemModuleEnv modBreaks_module be0 then do - let count = 1 + (maybe 0 fst $ IM.lookupMax imodBreaks_breakInfo) + let count = maybe 0 ((+1) . fst) $ IM.lookupMax imodBreaks_breakInfo breakArray <- GHCi.newBreakArray interp count evaluate $ extendModuleEnv be0 modBreaks_module breakArray else @@ -1708,7 +1708,7 @@ allocateCCS interp ce mbss foldlM (\ce0 InternalModBreaks{imodBreaks_breakInfo, imodBreaks_modBreaks=ModBreaks{..}} -> do if not $ elemModuleEnv modBreaks_module ce then do - let count = 1 + (maybe 0 fst $ IM.lookupMax imodBreaks_breakInfo) + let count = (maybe 0 ((+1) fst) $ IM.lookupMax imodBreaks_breakInfo) let ccs = IM.map (\info -> fromMaybe (toRemotePtr nullPtr) View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/commit/27645c843d99d18b089af9f4ad80b846... -- View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/commit/27645c843d99d18b089af9f4ad80b846... You're receiving this email because of your account on gitlab.haskell.org.
participants (1)
-
Rodrigo Mesquita (@alt-romes)