Questions tagged «haskell-stack»

3
Cabal和Stack有什么区别?
昨天,我了解了一个名为Stack的新Haskell工具。乍一看,它看起来和Cabal差不多。那么,它们之间有什么区别?堆栈可以代替Cabal吗?在哪些情况下应该使用Stack而不是Cabal?Cabal不能做什么Stack?

2
堆栈尚未通过GHC和Cabal版本的测试
在我执行Haskell项目时stack run,它显示以下内容,但仍在运行。这是什么警告?我该如何摆脱呢? Stack has not been tested with GHC versions above 8.6, and using 8.8.2, this may fail Stack has not been tested with Cabal versions above 2.4, but version 3.0.1.0 was found, this may fail

1
为什么Haskell的方括号函数在可执行文件中有效,但在测试中无法清除?
我看到一个非常奇怪的行为,其中Haskell的bracket功能表现不同,这取决于是否stack run或stack test使用。 考虑以下代码,其中使用两个嵌套括号来创建和清理Docker容器: module Main where import Control.Concurrent import Control.Exception import System.Process main :: IO () main = do bracket (callProcess "docker" ["run", "-d", "--name", "container1", "registry:2"]) (\() -> do putStrLn "Outer release" callProcess "docker" ["rm", "-f", "container1"] putStrLn "Done with outer release" ) (\() -> do bracket (callProcess …
By using our site, you acknowledge that you have read and understand our Cookie Policy and Privacy Policy.
Licensed under cc by-sa 3.0 with attribution required.