我是Haskell的新手。为什么当我尝试使用来自Data.Time
Days
我得到这个错误:导入Haskell模块
Could not find module `Data.Time':
It is a member of the hidden package `time-1.1.4'.
Perhaps you need to add `time' to the build-depends in your .cabal file.
我进口和Data.List模块Control.Monad,也不给我这个错误消息,但代码import Data.Time
一样。
我错过了什么?
感谢您的帮助!
编辑:我收到的时候我使用了类似的错误消息:import Directory
感谢球员,你的回答让我正轨!
从错误消息中,我假设您正在使用cabal来构建您的项目。在这种情况下,您需要列出您的项目依赖于cabal文件中的软件包。我认为这个语法就像“build-depends:time,directory”;如果不是这样,我确定这里有人会知道确切的语法。 – 2010-11-13 01:55:25
我一直在使用Leksah。也许它在幕后使用Cabal,我需要手动配置构建? – 2010-11-13 03:54:21