You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Consider making template-haskell non-reinstallable again #4098
This is a reminder ticket to investigate under which conditions it is allowed to reinstall template-haskell, and consequently decide whether we should disallow it sometimes or always.
UPDATE: On Mon, Dec 19, 2016, @goldfirere told me when I asked him under which conditions template-haskell would be safe to reinstall that
I think this is never a good idea. template-haskell is very intricately involved with GHC.
I can reproduce the following problem on my ghc-7.8 installation. By default, template-haskell-2.9.0.0 is installed. First,
$ cabal install template-haskell-2.11.0.0
succeeds. Then,
$ cabal install geniplate-mirror-0.7.2
fails with compilation errors:
[1 of 1] Compiling Data.Generics.Geniplate ( Data/Generics/Geniplate.hs, dist/build/Data/Generics/Geniplate.o )
Data/Generics/Geniplate.hs:83:25:
Couldn't match expected type ‘Dec’ with actual type ‘[Dec] -> Dec’
Probable cause: ‘InstanceD’ is applied to too few arguments
In the expression:
InstanceD [] (foldl AppT (ConT cls) ts) (funDef met e)
...
I guess this is because it picks up the newer version of template-haskell, which does not match. If I try to force the old version,
[1 of 1] Compiling Data.Generics.Geniplate ( Data/Generics/Geniplate.hs, dist/build/Data/Generics/Geniplate.o )
Data/Generics/Geniplate.hs:17:1:
Bad interface file: /usr/local/lib/ghc-7.8.4/template-haskell-2.9.0.0/Language/Haskell/TH.hi
Something is amiss; requested module template-haskell-2.9.0.0:Language.Haskell.TH differs from name found in the interface file template-haskell:Language.Haskell.TH
...
I can fix my system by unregistering the new template-haskell.
$ ghc-pkg unregister template-haskell-2.11.0.0
After that, installation of geniplate-mirror goes through.
Installation of another version of template-haskell confuses the system. I got the other template-haskell by a forced reinstall. But it seems that no good can come out of installing a newer version of template-haskell.
Activity
andreasabel commentedon Dec 14, 2016
I can reproduce the following problem on my ghc-7.8 installation. By default, template-haskell-2.9.0.0 is installed. First,
succeeds. Then,
fails with compilation errors:
I guess this is because it picks up the newer version of template-haskell, which does not match. If I try to force the old version,
I get this error:
I can fix my system by unregistering the new template-haskell.
After that, installation of geniplate-mirror goes through.
Installation of another version of template-haskell confuses the system. I got the other template-haskell by a forced reinstall. But it seems that no good can come out of installing a newer version of template-haskell.
Mark `template-haskell` non-upgradable (again)
Mark `template-haskell` non-upgradable (again)
sgraf812 commentedon May 24, 2024
FTR, this was tracked by https://gitlab.haskell.org/ghc/ghc/-/issues/24703 which will be resolved in https://gitlab.haskell.org/ghc/ghc/-/merge_requests/12479. The solution was (broadly speaking) to move wired-in Ids into
ghc-internalwhich is thus the only library that cannot be reinstalled.Mikolaj commentedon May 27, 2024
Am I right no changes in cabal are needed for this?