您如何导入Data.Heap? [英] How do you import Data.Heap?

查看:75
本文介绍了您如何导入Data.Heap?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

很抱歉提出这样一个愚蠢的问题.我正在尝试导入数据.堆,但我收到此错误消息:

Sorry for such a dumb question. I'm trying to import Data.Heap, but I get this error message:

> import Data.Heap

<no location info>: error:
    Could not find module ‘Data.Heap’
    Perhaps you meant
      Data.Map (from containers-0.5.7.1@containers-0.5.7.1)

没有其他进口的麻烦.

谢谢.

推荐答案

如注释中所述,您需要安装包含模块Data.Heap的软件包. (请参见有关此差异的问题在Haskell中的软件包和模块之间)

As was described in the comments, you need to install the package which contains the module Data.Heap. (See this related question on the difference between packages and modules in Haskell)

问题"页面上,在左上角,您将看到正在查看的软件包的名称和版本:

如果使用堆栈,则将heap添加到project.cabal文件的build-depends部分,然后重新生成.如果仅使用cabal,只需运行cabal install heap即可获取系统上安装的软件包的最新版本.

On the Hackage page, in the upper left-hand corner you will see the name and version of the package you are looking at:

If you are using stack, then add heap to your build-depends section of project.cabal file, and rebuild. If you are just using cabal, simply run cabal install heap to get the most recent version of the package installed on your system.

这篇关于您如何导入Data.Heap?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆