| ... |
... |
@@ -2692,8 +2692,9 @@ parseSpanArg s = do |
|
2692
|
2692
|
-- @<filename>:(<line>,<col>)-(<line-end>,<col-end>)@
|
|
2693
|
2693
|
-- while simply unpacking 'UnhelpfulSpan's
|
|
2694
|
2694
|
showSrcSpan :: SrcSpan -> String
|
|
2695
|
|
-showSrcSpan (UnhelpfulSpan s) = unpackFS (unhelpfulSpanFS s)
|
|
2696
|
|
-showSrcSpan (RealSrcSpan spn _) = showRealSrcSpan spn
|
|
|
2695
|
+showSrcSpan (UnhelpfulSpan s) = unpackFS (unhelpfulSpanFS s)
|
|
|
2696
|
+showSrcSpan (GeneratedSrcSpan _) = unpackFS (unhelpfulSpanFS UnhelpfulGenerated)
|
|
|
2697
|
+showSrcSpan (RealSrcSpan spn _) = showRealSrcSpan spn
|
|
2697
|
2698
|
|
|
2698
|
2699
|
-- | Variant of 'showSrcSpan' for 'RealSrcSpan's
|
|
2699
|
2700
|
showRealSrcSpan :: RealSrcSpan -> String
|
| ... |
... |
@@ -4235,14 +4236,14 @@ stepLocalCmd arg = withSandboxOnly ":steplocal" $ step arg |
|
4235
|
4236
|
mb_span <- getCurrentBreakSpan
|
|
4236
|
4237
|
case mb_span of
|
|
4237
|
4238
|
Nothing -> stepCmd []
|
|
4238
|
|
- Just (UnhelpfulSpan _) -> liftIO $ putStrLn ( -- #14690
|
|
4239
|
|
- ":steplocal is not possible." ++
|
|
4240
|
|
- "\nCannot determine current top-level binding after " ++
|
|
4241
|
|
- "a break on error / exception.\nUse :stepmodule.")
|
|
4242
|
|
- Just loc -> do
|
|
|
4239
|
+ Just loc@(RealSrcSpan{}) -> do
|
|
4243
|
4240
|
md <- fromMaybe (panic "stepLocalCmd") <$> getCurrentBreakModule
|
|
4244
|
4241
|
current_toplevel_decl <- flip enclosingTickSpan loc <$> getTickArray md
|
|
4245
|
4242
|
doContinue (GHC.LocalStep (RealSrcSpan current_toplevel_decl Strict.Nothing))
|
|
|
4243
|
+ Just _ -> liftIO $ putStrLn ( -- #14690
|
|
|
4244
|
+ ":steplocal is not possible." ++
|
|
|
4245
|
+ "\nCannot determine current top-level binding after " ++
|
|
|
4246
|
+ "a break on error / exception.\nUse :stepmodule.")
|
|
4246
|
4247
|
|
|
4247
|
4248
|
stepModuleCmd :: GhciMonad m => String -> m ()
|
|
4248
|
4249
|
stepModuleCmd arg = withSandboxOnly ":stepmodule" $ step arg
|
| ... |
... |
@@ -4580,7 +4581,7 @@ listCmd "" = do |
|
4580
|
4581
|
printForUser $ text "Not stopped at a breakpoint; nothing to list"
|
|
4581
|
4582
|
Just (RealSrcSpan pan _) ->
|
|
4582
|
4583
|
listAround pan True
|
|
4583
|
|
- Just pan@(UnhelpfulSpan _) ->
|
|
|
4584
|
+ Just pan@_ ->
|
|
4584
|
4585
|
do resumes <- GHC.getResumeContext
|
|
4585
|
4586
|
case resumes of
|
|
4586
|
4587
|
[] -> panic "No resumes"
|