[Git][ghc/ghc][wip/T23536-teo] Remove th_hack

Teo Camarasu (@teo) gitlab at gitlab.haskell.org
Fri Apr 5 09:31:59 UTC 2024



Teo Camarasu pushed to branch wip/T23536-teo at Glasgow Haskell Compiler / GHC


Commits:
d835af29 by Teo Camarasu at 2024-04-05T10:31:53+01:00
Remove th_hack

This is no longer necessary now that template-haskell is no longer a stage0 package

- - - - -


1 changed file:

- hadrian/src/Rules/ToolArgs.hs


Changes:

=====================================
hadrian/src/Rules/ToolArgs.hs
=====================================
@@ -85,25 +85,13 @@ multiSetup pkg_s = do
       need (srcs ++ gens)
       let rexp m = ["-reexported-module", m]
       let hidir = root </> "interfaces" </> pkgPath p
-      writeFile' (resp_file root p) (intercalate "\n" (th_hack arg_list
+      writeFile' (resp_file root p) (intercalate "\n" (arg_list
                                                       ++  modules cd
                                                       ++ concatMap rexp (reexportModules cd)
                                                       ++ ["-outputdir", hidir]))
       return (resp_file root p)
 
 
-    -- The template-haskell package is compiled with -this-unit-id=template-haskell but
-    -- everything which depends on it depends on `-package-id-template-haskell-2.17.0.0`
-    -- and so the logic for detetecting which home-units depend on what is defeated.
-    -- The workaround here is just to rewrite all the `-package-id` arguments to
-    -- point to `template-haskell` instead which works for the multi-repl case.
-    -- See #20887
-    th_hack :: [String] -> [String]
-    th_hack ((isPrefixOf "-package-id template-haskell" -> True) : xs) = "-package-id" : "template-haskell" : xs
-    th_hack (x:xs) = x : th_hack xs
-    th_hack [] = []
-
-
 toolRuleBody :: FilePath -> Action ()
 toolRuleBody fp = do
   mm <- dirMap



View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/commit/d835af29aaf96bbb0682718b9bc24e04bab14081

-- 
View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/commit/d835af29aaf96bbb0682718b9bc24e04bab14081
You're receiving this email because of your account on gitlab.haskell.org.


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.haskell.org/pipermail/ghc-commits/attachments/20240405/bda20e95/attachment-0001.html>


More information about the ghc-commits mailing list