How safe is it to update base?

霸气de小男生 提交于 2019-12-10 12:45:40

问题


On ubuntu I currently have haskell-platform 2011.2.0.1.2 installed, and I am currently working on some code where it would be very nice to have Control.Concurrent.Chan be an instance of Eq. Unfortunately, in base-4.3.1.0, which is the one I have installed, it is not, but in base-4.4.0.0 Chan is an instance of Eq.

Would it be possible to update base, maybe by sandboxing it with cabal-dev or any other method, in a way that would not break too many packages?


回答1:


No, you should never upgrade base. It's one of the boot packages — the packages that GHC itself needs to build, and ships with — and upgrading them will lead to Very Bad Things™. (Here's a full list of boot packages; everything with a - in the tag column is one. Don't upgrade these!)

Indeed, cabal-install's cabal upgrade feature was removed precisely because it had a nasty tendency to upgrade boot packages.

Not only is it a boot package, but being such core functionality, it's pretty much inherently tied to a specific GHC version. Your best option is to install the corresponding newer version of GHC in a local directory.



来源:https://stackoverflow.com/questions/10055986/how-safe-is-it-to-update-base

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!