GHC package conflicts

限于喜欢 提交于 2019-11-30 19:53:06

Import Data.Maybe. The haskell98 package is no longer compatible with base, so using the haskell98 modules brings just unnecessary pain.

The idea is that you use exactly one of haskell98, base, or haskell2010. The haskell* packages are the set of libraries mandated by the corresponding language standard, so if you use one of those you have a better chance of being compatible with non-GHC compilers. However, the vast majority of packages on Hackage use base anyway, so you're probably better off sticking with that.

Haskell98 strictly speaking predates hierarchical modules, so that's why they are all called Maybe and List and IO and so forth. (Actually, I think these are better names than what they are now, but that's another story). Your problem is that you were trying to use the old Maybe and the new System.IO at the same time, and neither the old nor the new package provides both.

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