gpt4 book ai didi

haskell - 导入 Haskell 模块

转载 作者:行者123 更新时间:2023-12-04 16:49:27 24 4
gpt4 key购买 nike

我是 Haskell 的新手。我怎么用Days来自 Data.Time我收到此错误:

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
谢谢大家,你们的回答让我走上了正轨!

最佳答案

用这个项目启动 Leksah,打开包菜单并从中选择“编辑包”。现在,选择“依赖项”并添加您需要的依赖项(在您的情况下为 time )。您也可以选择一个版本。

PS:之后不要忘记点击“保存”按钮。 (我认为这是一个设计失败......)。

关于haskell - 导入 Haskell 模块,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/4170426/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com