[英]haskell stack won't install dates
在独立模块中,我使用通过cabal安装的date包http://hackage.haskell.org/package/dates ,它可以正常工作。 但是,当我尝试使用堆栈从该模块中制作一个小包装时,就会出现问题。 date包在依赖项中适当列出,但所有包都无效。 当我尝试在项目沙箱中使用堆栈手动安装软件包时,出现以下错误。 同时,我可以使用Cabal在堆栈沙箱外部安装此软件包,而不会出现问题。
沙盒中的版本:ghc-8.4.3 stack-1.7.1
系统版本:ghc-8.0.2 cabal-1.24.0.2(编译为1.24.2.0)
错误信息:
Configuring dates-0.2.2.1...
Preprocessing library for dates-0.2.2.1..
Building library for dates-0.2.2.1..
[1 of 4] Compiling Data.Dates.Internal ( Data/Dates/Internal.hs, .stack-work/dist/x86_64-linux/Cabal-2.2.0.1/build/Data/Dates/Internal.o )
[2 of 4] Compiling Data.Dates.Types ( Data/Dates/Types.hs, .stack-work/dist/x86_64-linux/Cabal-2.2.0.1/build/Data/Dates/Types.o )
/tmp/stack16211/dates-0.2.2.1/Data/Dates/Types.hs:62:10: error:
• No instance for (Semigroup DateTime)
arising from the superclasses of an instance declaration
• In the instance declaration for ‘Monoid DateTime’
|
62 | instance Monoid DateTime where
| ^^^^^^^^^^^^^^^
最后,我需要将stack.yaml文件中的解析器更改为旧版本(lts-8.24),这将强制使用ghc-8.0.2。 运用
stack --resolver ghc-8.0.2设置/构建
我没有阻止堆栈使用最新的ghc版本
堆栈执行blah-exe
引发了冲突。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.