我是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