Marge Bot pushed to branch master at Glasgow Haskell Compiler / GHC
Commits:
-
87f510a5
by Simon Hengel at 2026-06-09T18:03:25-04:00
7 changed files:
- compiler/GHC/Driver/Backend.hs
- compiler/GHC/Parser/PostProcess/Haddock.hs
- compiler/GHC/Runtime/Debugger/Breakpoints.hs
- compiler/GHC/Runtime/Eval/Types.hs
- compiler/GHC/Runtime/Heap/Inspect.hs
- compiler/GHC/Utils/Logger.hs
- libraries/ghc-internal/src/GHC/Internal/Lexeme.hs
Changes:
| ... | ... | @@ -184,7 +184,7 @@ import GHC.Platform |
| 184 | 184 | -- about enumerating them. Just one set of error messages has been
|
| 185 | 185 | -- ported to have an open-world assumption: these are the error
|
| 186 | 186 | -- messages associated with type checking of foreign imports and
|
| 187 | --- exports. To allow other errors to be issued with an open-world
|
|
| 187 | +-- exports. To allow other errors to be issued with an open-world
|
|
| 188 | 188 | -- assumption, use functions `backendValidityOfCImport` and
|
| 189 | 189 | -- `backendValidityOfCExport` as models, and have a look at how the
|
| 190 | 190 | -- 'expected back ends' are used in modules "GHC.Tc.Gen.Foreign" and
|
| ... | ... | @@ -225,11 +225,11 @@ platformJSSupported platform |
| 225 | 225 | | otherwise = False
|
| 226 | 226 | |
| 227 | 227 | |
| 228 | --- | A value of type @Backend@ represents one of GHC's back ends.
|
|
| 228 | +-- | A value of type @Backend@ represents one of GHC's back ends.
|
|
| 229 | 229 | -- The set of back ends cannot be extended except by modifying the
|
| 230 | 230 | -- definition of @Backend@ in this module.
|
| 231 | 231 | --
|
| 232 | --- The @Backend@ type is abstract; that is, its value constructors are
|
|
| 232 | +-- The @Backend@ type is abstract; that is, its value constructors are
|
|
| 233 | 233 | -- not exported. It's crucial that they not be exported, because a
|
| 234 | 234 | -- value of type @Backend@ carries only the back end's /name/, not its
|
| 235 | 235 | -- behavior or properties. If @Backend@ were not abstract, then code
|
| ... | ... | @@ -289,7 +289,7 @@ instance HasHaddock (Located (HsModule GhcPs)) where |
| 289 | 289 | pure $ L l_mod $
|
| 290 | 290 | mod { hsmodExports = hsmodExports'
|
| 291 | 291 | , hsmodDecls = hsmodDecls'
|
| 292 | - , hsmodExt = (hsmodExt mod) { hsmodHaddockModHeader = headerDocs } }
|
|
| 292 | + , hsmodExt = (hsmodExt mod) { hsmodHaddockModHeader = headerDocs } }
|
|
| 293 | 293 | |
| 294 | 294 | lexHsDocString :: HsDocString -> HsDoc GhcPs
|
| 295 | 295 | lexHsDocString = lexHsDoc parseIdentifier
|
| ... | ... | @@ -177,7 +177,7 @@ resolveFunctionBreakpoint inp = do |
| 177 | 177 | -- for
|
| 178 | 178 | -- (a) this binder only (it maybe a top-level or a nested declaration)
|
| 179 | 179 | -- (b) that do not have an enclosing breakpoint
|
| 180 | -findBreakForBind :: String {-^ Name of bind to break at -} -> ModBreaks -> [(BreakTickIndex, RealSrcSpan)]
|
|
| 180 | +findBreakForBind :: String {-^ Name of bind to break at -} -> ModBreaks -> [(BreakTickIndex, RealSrcSpan)]
|
|
| 181 | 181 | findBreakForBind str_name modbreaks = filter (not . enclosed) ticks
|
| 182 | 182 | where
|
| 183 | 183 | ticks = [ (index, span)
|
| ... | ... | @@ -226,7 +226,7 @@ getModBreak m = do |
| 226 | 226 | -- source breakpoint, it means all *ocurrences* of that breakpoint across
|
| 227 | 227 | -- modules should be stopped at -- hence we keep a trie from BreakpointId to
|
| 228 | 228 | -- the list of internal break ids using it.
|
| 229 | --- See also Note [Breakpoint identifiers]
|
|
| 229 | +-- See also Note [Breakpoint identifiers]
|
|
| 230 | 230 | type BreakpointOccurrences = ModuleEnv (IntMap.IntMap [InternalBreakpointId])
|
| 231 | 231 | |
| 232 | 232 | -- | Lookup all InternalBreakpointIds matching the given BreakpointId
|
| ... | ... | @@ -75,7 +75,7 @@ enableGhcStepMode _ = EvalStepSingle |
| 75 | 75 | -- and the SrcSpan of a breakpoint we hit, return @True@ if we should stop at
|
| 76 | 76 | -- this breakpoint.
|
| 77 | 77 | --
|
| 78 | --- In particular, this will always be @False@ for @'RunToCompletion'@ and
|
|
| 78 | +-- In particular, this will always be @False@ for @'RunToCompletion'@ and
|
|
| 79 | 79 | -- @'RunAndLogSteps'@. We'd need further information e.g. about the user
|
| 80 | 80 | -- breakpoints to determine whether to break in those modes.
|
| 81 | 81 | breakHere :: Bool -- ^ Was this breakpoint explicitly active (in the @BreakArray@s)?
|
| ... | ... | @@ -293,22 +293,22 @@ ppr_termM1 Prim{valRaw=words, ty=ty} = |
| 293 | 293 | return $ repPrim (tyConAppTyCon ty) words
|
| 294 | 294 | ppr_termM1 Suspension{ty=ty, bound_to=Nothing, infoprov=mipe} =
|
| 295 | 295 | return $ hcat $
|
| 296 | - [ char '_'
|
|
| 297 | - , whenPprDebug $
|
|
| 296 | + [ char '_'
|
|
| 297 | + , whenPprDebug $
|
|
| 298 | 298 | space <>
|
| 299 | 299 | dcolon <>
|
| 300 | 300 | pprSigmaType ty
|
| 301 | - ] ++
|
|
| 302 | - [ whenPprDebug $
|
|
| 301 | + ] ++
|
|
| 302 | + [ whenPprDebug $
|
|
| 303 | 303 | space <>
|
| 304 | 304 | char '<' <>
|
| 305 | 305 | text (ipSrcFile ipe) <>
|
| 306 | 306 | char ':' <>
|
| 307 | 307 | text (ipSrcSpan ipe) <>
|
| 308 | 308 | char '>'
|
| 309 | - | Just ipe <- [mipe]
|
|
| 309 | + | Just ipe <- [mipe]
|
|
| 310 | 310 | , not $ null $ ipSrcFile ipe
|
| 311 | - ]
|
|
| 311 | + ]
|
|
| 312 | 312 | ppr_termM1 Suspension{ty=ty, bound_to=Just n}
|
| 313 | 313 | | otherwise = return$ parens$ ppr n <> dcolon <> pprSigmaType ty
|
| 314 | 314 | ppr_termM1 Term{} = panic "ppr_termM1 - Term"
|
| ... | ... | @@ -413,7 +413,7 @@ defaultLogAction = defaultLogActionWithHandles stdout stderr |
| 413 | 413 | |
| 414 | 414 | -- | The default 'LogAction' parametrized over the standard output and standard error handles.
|
| 415 | 415 | -- Allows clients to replicate the log message formatting of GHC with custom handles.
|
| 416 | -defaultLogActionWithHandles :: Handle {-^ Handle for standard output -} -> Handle {-^ Handle for standard errors -} -> LogAction
|
|
| 416 | +defaultLogActionWithHandles :: Handle {-^ Handle for standard output -} -> Handle {-^ Handle for standard errors -} -> LogAction
|
|
| 417 | 417 | defaultLogActionWithHandles out err logflags msg_class srcSpan msg
|
| 418 | 418 | | log_dopt Opt_D_dump_json logflags = jsonLogActionWithHandle out logflags msg_class srcSpan msg
|
| 419 | 419 | | otherwise = case msg_class of
|
| ... | ... | @@ -44,7 +44,7 @@ okSymChar c |
| 44 | 44 | _ -> False
|
| 45 | 45 | |
| 46 | 46 | startsVarSym, startsVarId, startsConSym, startsConId :: Char -> Bool
|
| 47 | -startsVarSym c = okSymChar c && c /= ':' -- Infix Ids
|
|
| 47 | +startsVarSym c = okSymChar c && c /= ':' -- Infix Ids
|
|
| 48 | 48 | startsConSym c = c == ':' -- Infix data constructors
|
| 49 | 49 | startsVarId c = c == '_' || case generalCategory c of -- Ordinary Ids
|
| 50 | 50 | LowercaseLetter -> True
|