cabal安装MissingPy找不到Data.HashTable

时间:2017-01-15 14:53:39

标签: haskell cabal

我尝试安装MissingPy,但失败了

on the commandline: Warning:
 -XOverlappingInstances is deprecated: instead use per-instance pragmas     OVERLAPPING/OVERLAPPABLE/OVERLAPS

src/Database/AnyDBM.hs:44:8:
    Could not find module ‘Data.HashTable’
 Perhaps you meant
   Data.Hashable (needs flag -package-key     hashable->1.2.5.0@hasha_Evd2cSGupW8AJnHTBSvXg8)
      Data.HashTable.IO (needs flag -package-key     hashtables->1.2.1.0@hasht_EuNk8qBpsPjAV2dYmonrJi)
    Use -v to see a list of the files searched for.
cabal: Error: some packages failed to install:
anydbm-1.0.7 failed during the building phase. The exception was:
ExitFailure 1

我发现某个地方,不推荐使用Data.HashTable。还有关于hackage的文档,但它没有提到包名。 如何安装Data.HashTable?

1 个答案:

答案 0 :(得分:4)

base 4.6已弃用base 4.7并已在ghc中删除。 regex named group。每个版本的base都是具有base特定版本的软件包,因此如果您想使用较早版本的ghc,则必须使用较旧的ghc。与base 4.6打包在一起的ghc 7.6的最新版本为Data.Map

如果您需要地图,则有更好的选择:Data.IntMapData.HashMap是有序地图。 Data.HashTable是一个不可变的无序地图。 Data.JudyprepareStatement()是可变无序地图。