[英]Date-time package in haskell - error in the current one, can't find an analog
When I was installing the package datetime I got an error in it: 当我安装软件包datetime时,出现错误:
$ cabal install datetime
Resolving dependencies...
Configuring datetime-0.2.1...
Building datetime-0.2.1...
Preprocessing library datetime-0.2.1...
[1 of 1] Compiling Data.DateTime ( src/Data/DateTime.lhs, dist/dist-sandbox-5f6496af/build/Data/DateTime.o )
src/Data/DateTime.lhs:139:31:
Ambiguous occurrence ‘defaultTimeLocale’
It could refer to either ‘Data.Time.Format.defaultTimeLocale’,
imported from ‘Data.Time.Format’ at src/Data/DateTime.lhs:8:3-25
(and originally defined in ‘time-1.5.0.1:Data.Time.Format.Locale’)
or ‘System.Locale.defaultTimeLocale’,
imported from ‘System.Locale’ at src/Data/DateTime.lhs:12:3-22
src/Data/DateTime.lhs:142:29:
Ambiguous occurrence ‘defaultTimeLocale’
It could refer to either ‘Data.Time.Format.defaultTimeLocale’,
imported from ‘Data.Time.Format’ at src/Data/DateTime.lhs:8:3-25
(and originally defined in ‘time-1.5.0.1:Data.Time.Format.Locale’)
or ‘System.Locale.defaultTimeLocale’,
imported from ‘System.Locale’ at src/Data/DateTime.lhs:12:3-22
src/Data/DateTime.lhs:144:15:
Ambiguous occurrence ‘iso8601DateFormat’
It could refer to either ‘Data.Time.Format.iso8601DateFormat’,
imported from ‘Data.Time.Format’ at src/Data/DateTime.lhs:8:3-25
(and originally defined in ‘time-1.5.0.1:Data.Time.Format.Locale’)
or ‘System.Locale.iso8601DateFormat’,
imported from ‘System.Locale’ at src/Data/DateTime.lhs:12:3-22
Failed to install datetime-0.2.1
cabal: Error: some packages failed to install:
datetime-0.2.1 failed during the building phase. The exception was:
ExitFailure 1
Since its repository at github doesn't exist anymore, what do you suggest me: somehow fix the error or chose another package? 由于它在github上的存储库不再存在,您对我有什么建议:以某种方式解决该错误或选择了另一个软件包? I tried to find another find but couldn't.
我试图找到另一个发现,但是找不到。 What I need is to be able to work with the date-times.
我需要的是能够处理日期时间。
Luckily Stack Builders wrote a version which is compatible with the latest compiler. 幸运的是, Stack Builders编写了一个与最新编译器兼容的版本。 You can find the source here .
您可以在此处找到源。 As the repo doc says, this is updated to Hackage with the name
datetime-sb
, so you can install it and use it in your dependencies exactly like the original library, just substituting datetime
with datetime-sb
wherever you need to refer to the package name 如回购文档所述,此名称已更新为Hackage,名称为
datetime-sb
,因此您可以像原始库一样安装并在依赖项中使用它,只需在需要引用包的地方用datetime-sb
替换datetime
即可。名称
Eventually Stack Builders took over maintaining the datetime
package. 最终, Stack Builders接管了
datetime
包的维护。 This problem should not happen anymore for anybody 这个问题对任何人都不会再发生
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.