X-Git-Url: http://git.megacz.com/?p=ghc-hetmet.git;a=blobdiff_plain;f=ghc%2FGhciTags.hs;h=ffec5be64dc26c907d39125a641dde6bdacd4539;hp=fc5cf00e4b03db6dfa9a1ed7029ce6747f225304;hb=b2bd63f99d643f6b3eb30bb72bb9ae26d4183252;hpb=cba098d7823815baa66bcaff7e4f8b54855ae6eb diff --git a/ghc/GhciTags.hs b/ghc/GhciTags.hs index fc5cf00..ffec5be 100644 --- a/ghc/GhciTags.hs +++ b/ghc/GhciTags.hs @@ -18,6 +18,7 @@ import GHC import GhciMonad import Outputable import Util +import SrcLoc -- ToDo: figure out whether we need these, and put something appropriate -- into the GHC API instead @@ -91,13 +92,13 @@ listModuleTags m = do let names = fromMaybe [] $GHC.modInfoTopLevelScope mInfo let localNames = filter ((m==) . nameModule) names mbTyThings <- mapM GHC.lookupName localNames - return $! [ tagInfo unqual exported kind name loc + return $! [ tagInfo unqual exported kind name realLoc | tyThing <- catMaybes mbTyThings , let name = getName tyThing , let exported = GHC.modInfoIsExportedName mInfo name , let kind = tyThing2TagKind tyThing , let loc = srcSpanStart (nameSrcSpan name) - , isGoodSrcLoc loc + , RealSrcLoc realLoc <- [loc] ] where @@ -120,7 +121,7 @@ data TagInfo = TagInfo -- get tag info, for later translation into Vim or Emacs style -tagInfo :: PrintUnqualified -> Bool -> Char -> Name -> SrcLoc -> TagInfo +tagInfo :: PrintUnqualified -> Bool -> Char -> Name -> RealSrcLoc -> TagInfo tagInfo unqual exported kind name loc = TagInfo exported kind (showSDocForUser unqual $ pprOccName (nameOccName name))