Marge Bot pushed to branch master at Glasgow Haskell Compiler / GHC
Commits:
-
f8b2bd8f
by Alan Zimmerman at 2026-09-08T09:39:12-04:00
3 changed files:
Changes:
| ... | ... | @@ -58,6 +58,7 @@ import Language.Haskell.Syntax.Doc |
| 58 | 58 | import Language.Haskell.Syntax.Extension
|
| 59 | 59 | import Language.Haskell.Syntax.Module.Name
|
| 60 | 60 | |
| 61 | +-- Exact print annotations ignore LHsDoc, so bare SrcSpan is fine
|
|
| 61 | 62 | type instance Anno (WithHsDocIdentifiers (HsDocString (GhcPass pass)) (GhcPass pass)) = SrcSpan
|
| 62 | 63 | |
| 63 | 64 | deriving instance (Data pass, Data (LIdP pass), Data a) => Data (WithHsDocIdentifiers a pass)
|
| ... | ... | @@ -46,6 +46,7 @@ type instance XRec (GhcPass p) a = XRecGhc a |
| 46 | 46 | -- but pass-independent, source location
|
| 47 | 47 | type XRecGhc a = GenLocated (Anno a) a
|
| 48 | 48 | |
| 49 | +-- Exact print annotations ignore LHsDoc, so bare SrcSpan is fine
|
|
| 49 | 50 | type instance Anno (HsDocString (GhcPass _)) = SrcSpan
|
| 50 | 51 | type instance Anno HsDocStringChunk = SrcSpan
|
| 51 | 52 |
| ... | ... | @@ -3404,13 +3404,13 @@ instance ExactPrint (HsCmd GhcPs) where |
| 3404 | 3404 | e' <- markAnnotated e
|
| 3405 | 3405 | return (HsCmdLet (tkLet', tkIn') binds' e')
|
| 3406 | 3406 | |
| 3407 | - exact (HsCmdDo (an0,loc) (L l es)) = do
|
|
| 3407 | + exact (HsCmdDo (an0,loc) es) = do
|
|
| 3408 | 3408 | debugM $ "HsCmdDo"
|
| 3409 | 3409 | loc' <- printStringAtAA loc "do"
|
| 3410 | 3410 | (an1,es') <- markAnnList' an0 $ do
|
| 3411 | - ee <- mapM markAnnotated es
|
|
| 3411 | + ee <- markAnnotated es
|
|
| 3412 | 3412 | return ee
|
| 3413 | - return (HsCmdDo (an1,loc') (L l es'))
|
|
| 3413 | + return (HsCmdDo (an1,loc') es')
|
|
| 3414 | 3414 | |
| 3415 | 3415 | -- ---------------------------------------------------------------------
|
| 3416 | 3416 | |
| ... | ... | @@ -4508,10 +4508,10 @@ instance ExactPrint [LocatedA (StmtLR GhcPs GhcPs (LocatedA (HsCmd GhcPs)))] whe |
| 4508 | 4508 | Just (initStmts, ls@(L _ (LastStmt _ _body _ _))) -> do
|
| 4509 | 4509 | debugM $ "LocatedL [ExprLStmt: snocView"
|
| 4510 | 4510 | ls' <- markAnnotated ls
|
| 4511 | - initStmts' <- markAnnotated initStmts
|
|
| 4511 | + initStmts' <- mapM markAnnotated initStmts
|
|
| 4512 | 4512 | return (initStmts' ++ [ls'])
|
| 4513 | 4513 | _ -> do
|
| 4514 | - stmts' <- markAnnotated stmts
|
|
| 4514 | + stmts' <- mapM markAnnotated stmts
|
|
| 4515 | 4515 | return stmts'
|
| 4516 | 4516 | |
| 4517 | 4517 | instance ExactPrint [Located HsDocStringChunk] where
|