Haskell中的Control.Parallel编译问题 [英] Control.Parallel compile issue in Haskell
本文介绍了Haskell中的Control.Parallel编译问题的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
编译器每次都在抱怨并行Haskell的不同示例应用程序.并显示以下消息:
The compiler is complaining each time on different example applications of parallel Haskell; with this message:
Could not find module `Control.Parallel.Strategies'
ghc编译器命令:
ghc -threaded -i/sudo/dir/par-modules/3 -cpp -DEVAL_STRATEGIES -eventlog --make parFib.hs
更简单
ghc -O2 --make -threaded parFib.hs
我忽略了哪些细节?我是否缺少一些PATH变量.
What detail am I overlooking? Am I missing some PATH variable.
进口看起来像这样:
module Main where
import System
# if defined(EVAL_STRATEGIES)
import Control.Parallel
import Control.Parallel.Strategies
#endif
欢呼
推荐答案
您必须安装并行从Hackage打包.在大多数理智的设置中,这应该像键入一样简单
You must install the parallel package from Hackage. In most sane setups, this should be as simple as typing
cabal install parallel # note: not sudo cabal install parallel!
在您的命令提示符下.
这篇关于Haskell中的Control.Parallel编译问题的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文