cabal 安装 MissingPy 找不到 Data.HashTable

cabal install MissingPy can’t find Data.HashTable

我尝试安装 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 已被弃用。仍然有关于它的黑客攻击的文档,但没有提到包名。 如何安装 Data.HashTable?

Data.Hashtable package was deprecated in base 4.6 and removed in base 4.7. base is a core libraryghc 的每个版本都是包含特定版本 base 的软件包,因此如果您想使用旧版本的 base,则必须使用旧版本的 ghc。与 base 4.6 一起打包的 ghc 的最后一个版本是 ghc 7.6.

如果你需要地图,有更好的选择:Data.MapData.IntMap是有序地图。 Data.HashMap 是一个不可变的无序映射。 Data.HashTableData.Judy 是可变的无序映射。