@@ -133,7 +133,7 @@ locationsAtPoint getHieFile IdeOptions{..} pkgState pos =
133133 -- This case usually arises when the definition is in an external package.
134134 -- In this case the interface files contain garbage source spans
135135 -- so we instead read the .hie files to get useful source spans.
136− let mod = nameModule name
136+ mod <- MaybeT $ return $ nameModule_maybe name
137137 let unitId = moduleUnitId mod
138138 pkgConfig <- MaybeT $ pure $ lookupPackageConfig unitId pkgState
139139 hiePath <- MaybeT $ liftIO $ optLocateHieFile optPkgLocationOpts pkgConfig mod
@@ -147,7 +147,7 @@ locationsAtPoint getHieFile IdeOptions{..} pkgState pos =
147147 pure span
148148 -- We ignore uniques and source spans and only compare the name and the module.
149149 eqName :: Name -> Name -> Bool
150− eqName n n' = nameOccName n == nameOccName n' && nameModule n == nameModule n'
150+ eqName n n' = nameOccName n == nameOccName n' && nameModule_maybe n == nameModule_maybe n'
151151 setFileName f (RealSrcSpan span) = RealSrcSpan (span { srcSpanFile = mkFastString f })
152152 setFileName _ span@(UnhelpfulSpan _) = span
153153