@@ -133,7 +133,7 @@ locationsAtPoint getHieFile IdeOptions{..} pkgState pos =
133 -- This case usually arises when the definition is in an external package.
133 -- This case usually arises when the definition is in an external package.
134 -- In this case the interface files contain garbage source spans
134 -- In this case the interface files contain garbage source spans
135 -- so we instead read the .hie files to get useful source spans.
135 -- so we instead read the .hie files to get useful source spans.
136− let mod = nameModule name
136+ mod <- MaybeT $ return $ nameModule_maybe name
137 let unitId = moduleUnitId mod
137 let unitId = moduleUnitId mod
138 pkgConfig <- MaybeT $ pure $ lookupPackageConfig unitId pkgState
138 pkgConfig <- MaybeT $ pure $ lookupPackageConfig unitId pkgState
139 hiePath <- MaybeT $ liftIO $ optLocateHieFile optPkgLocationOpts pkgConfig mod
139 hiePath <- MaybeT $ liftIO $ optLocateHieFile optPkgLocationOpts pkgConfig mod
@@ -147,7 +147,7 @@ locationsAtPoint getHieFile IdeOptions{..} pkgState pos =
147 pure span
147 pure span
148 -- We ignore uniques and source spans and only compare the name and the module.
148 -- We ignore uniques and source spans and only compare the name and the module.
149 eqName :: Name -> Name -> Bool
149 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'
151 setFileName f (RealSrcSpan span) = RealSrcSpan (span { srcSpanFile = mkFastString f })
151 setFileName f (RealSrcSpan span) = RealSrcSpan (span { srcSpanFile = mkFastString f })
152 setFileName _ span@(UnhelpfulSpan _) = span
152 setFileName _ span@(UnhelpfulSpan _) = span