From 691c450f1e9cc3fd83b662be3c0134fde03e97db Mon Sep 17 00:00:00 2001 From: Alan Zimmerman Date: Sat, 23 Oct 2021 10:49:55 +0100 Subject: EPA: Use LocatedA for ModuleName This allows us to use an Anchor with a DeltaPos in it when exact printing. --- compiler/GHC/Parser/PostProcess/Haddock.hs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'compiler/GHC/Parser/PostProcess/Haddock.hs') diff --git a/compiler/GHC/Parser/PostProcess/Haddock.hs b/compiler/GHC/Parser/PostProcess/Haddock.hs index 5cb81edcdb..f0adba4e6f 100644 --- a/compiler/GHC/Parser/PostProcess/Haddock.hs +++ b/compiler/GHC/Parser/PostProcess/Haddock.hs @@ -249,10 +249,10 @@ instance HasHaddock (Located HsModule) where -- Only do this when the module header exists. headerDocs <- for @Maybe (hsmodName mod) $ \(L l_name _) -> - extendHdkA l_name $ liftHdkA $ do + extendHdkA (locA l_name) $ liftHdkA $ do -- todo: register keyword location of 'module', see Note [Register keyword location] docs <- - inLocRange (locRangeTo (getBufPos (srcSpanStart l_name))) $ + inLocRange (locRangeTo (getBufPos (srcSpanStart (locA l_name)))) $ takeHdkComments mkDocNext selectDocString docs -- cgit v1.2.1