ghc-tags 1.6 → 1.7
raw patch · 5 files changed
+19/−22 lines, 5 filesdep ~aesondep ~basedep ~ghc-lib
Dependency ranges changed: aeson, base, ghc-lib
Files
- CHANGELOG.md +3/−0
- ghc-tags.cabal +6/−6
- src/GhcTags/Ghc.hs +5/−5
- src/GhcTags/GhcCompat.hs +3/−9
- src/Main.hs +2/−2
CHANGELOG.md view
@@ -1,3 +1,6 @@+# ghc-tags-1.7 (2023-06-29)+* Add support for GHC 9.6 and drop support for GHC 9.0.+ # ghc-tags-1.6 (2023-01-30) * Handle definitions of class methods properly. * Enable `ImportQualifiedPost`, `MagicHash`, `QuasiQuotes` and
ghc-tags.cabal view
@@ -1,6 +1,6 @@ cabal-version: 2.4 name: ghc-tags-version: 1.6+version: 1.7 synopsis: Utility for generating ctags and etags with GHC API. description: Utility for generating etags (Emacs) and ctags (Vim and other editors) with GHC API for efficient project navigation.@@ -14,7 +14,7 @@ README.md homepage: https://github.com/arybczak/ghc-tags bug-reports: https://github.com/arybczak/ghc-tags/issues-tested-with: GHC ==9.0.2 || ==9.2.5 || ==9.4.4+tested-with: GHC ==9.2.8 || ==9.4.5 || ==9.6.2 source-repository head type: git@@ -28,13 +28,13 @@ executable ghc-tags ghc-options: -Wall -threaded -rtsopts -with-rtsopts=-A4m - if !flag(ghc-lib) && impl(ghc == 9.4.*)+ if !flag(ghc-lib) && impl(ghc == 9.6.*) build-depends: ghc, ghc-boot else- build-depends: ghc-lib == 9.4.*+ build-depends: ghc-lib == 9.6.* - build-depends: base >=4.15 && <4.18- , aeson >= 2.0.0.0+ build-depends: base >=4.16 && <4.19+ , aeson >= 2.0.0.0 && < 2.2.0.0 , async , attoparsec , bytestring
src/GhcTags/Ghc.hs view
@@ -23,7 +23,8 @@ import GHC.Types.Name.Reader import GHC.Types.SourceText import GHC.Types.SrcLoc-import GHC.Unit.Module.Name+import Language.Haskell.Syntax.Module.Name+import qualified Data.Foldable as F -- | Kind of the term. --@@ -170,7 +171,7 @@ -- * /data type families instances/ -- * /data type family instances constructors/ ---getGhcTags :: Located HsModule+getGhcTags :: Located (HsModule GhcPs) -> [GhcTag] getGhcTags (L _ HsModule { hsmodName, hsmodDecls, hsmodExports }) = maybeToList (mkModNameTag <$> hsmodName)@@ -342,7 +343,7 @@ -- foreign declaration ForD _ foreignDecl -> case foreignDecl of- ForeignImport { fd_name, fd_fi = CImport _ _ _mheader _ (L _ sourceText) } ->+ ForeignImport { fd_name, fd_fi = CImport (L _ sourceText) _ _ _mheader _ } -> case sourceText of NoSourceText -> tag -- TODO: add header information from '_mheader'@@ -375,7 +376,7 @@ mkConsTags decLoc tyName con@ConDeclGADT { con_names, con_g_args } = (\n -> mkGhcTagForMember decLoc n tyName (GtkGADTConstructor con))- `map` con_names+ `map` F.toList con_names ++ mkHsConDeclGADTDetails decLoc tyName con_g_args mkConsTags decLoc tyName con@ConDeclH98 { con_name, con_args } =@@ -474,7 +475,6 @@ flip (mkGhcTag' decLoc) (GtkTypeSignature HsWC { hswc_ext = NoExtField , hswc_body = hsSigWcType }) `map` lhs- mkSigTags _ IdSig {} = [] -- TODO: generate theses with additional info (fixity) mkSigTags _ FixSig {} = [] mkSigTags _ InlineSig {} = []
src/GhcTags/GhcCompat.hs view
@@ -18,7 +18,6 @@ import GHC.Settings import GHC.Settings.Config import GHC.Settings.Utils-import GHC.SysTools import GHC.SysTools.BaseDir import GHC.Types.SrcLoc import GHC.Utils.Fingerprint@@ -33,7 +32,7 @@ :: FilePath -> DynFlags -> StringBuffer- -> ParseResult (Located HsModule)+ -> ParseResult (Located (HsModule GhcPs)) parseModule filename flags buffer = unP Parser.parseModule parseState where location = mkRealSrcLoc (mkFastString filename) 1 1@@ -43,9 +42,8 @@ runGhc m = do env <- liftIO $ do mySettings <- compatInitSettings libdir- myLlvmConfig <- lazyInitLlvmConfig libdir- dflags <- threadSafeInitDynFlags (defaultDynFlags mySettings myLlvmConfig)- newHscEnv dflags+ dflags <- threadSafeInitDynFlags (defaultDynFlags mySettings)+ newHscEnv libdir dflags ref <- newIORef env unGhc (GHC.withCleanupSession m) (Session ref) @@ -132,7 +130,6 @@ cc_args = words cc_args_str ++ unreg_cc_args cxx_args = words cxx_args_str ldSupportsCompactUnwind <- getBooleanSetting "ld supports compact unwind"- ldSupportsBuildId <- getBooleanSetting "ld supports build-id" ldSupportsFilelist <- getBooleanSetting "ld supports filelist" ldIsGnuLd <- getBooleanSetting "ld is GNU ld" @@ -145,7 +142,6 @@ unlit_path <- getToolSetting "unlit command" windres_path <- getToolSetting "windres command"- libtool_path <- getToolSetting "libtool command" ar_path <- getToolSetting "ar command" otool_path <- getToolSetting "otool command" install_name_tool_path <- getToolSetting "install_name_tool command"@@ -196,7 +192,6 @@ , sToolSettings = ToolSettings { toolSettings_ldSupportsCompactUnwind = ldSupportsCompactUnwind- , toolSettings_ldSupportsBuildId = ldSupportsBuildId , toolSettings_ldSupportsFilelist = ldSupportsFilelist , toolSettings_ldIsGnuLd = ldIsGnuLd , toolSettings_ccSupportsNoPie = gccSupportsNoPie@@ -211,7 +206,6 @@ , toolSettings_pgm_dll = (mkdll_prog,mkdll_args) , toolSettings_pgm_T = touch_path , toolSettings_pgm_windres = windres_path- , toolSettings_pgm_libtool = libtool_path , toolSettings_pgm_ar = ar_path , toolSettings_pgm_otool = otool_path , toolSettings_pgm_install_name_tool = install_name_tool_path
src/Main.hs view
@@ -151,7 +151,7 @@ report :: Diagnostic e => DynFlags -> Bag (MsgEnvelope e) -> IO () report flags msgs = sequence_ [ putStrLn $ showSDoc flags msg- | msg <- pprMsgEnvelopeBagWithLoc msgs+ | msg <- pprMsgEnvelopeBagWithLocDefault msgs ] -- Alex and Hsc files need to be preprocessed before going into GHC.@@ -307,7 +307,7 @@ SingETag -> fmap (fmap ([], )) . ETag.parseTagsFile SingCTag -> CTag.parseTagsFile -updateTagsWith :: DynFlags -> Located HsModule -> DirtyTags -> DirtyTags+updateTagsWith :: DynFlags -> Located (HsModule GhcPs) -> DirtyTags -> DirtyTags updateTagsWith dflags hsModule DirtyTags{..} = DirtyTags { dtTags = Map.unionWith mergeTags fileTags dtTags , ..