简体   繁体   English

导入Control.Monad.Par不起作用

[英]import Control.Monad.Par not working

Here are my version info: 这是我的版本信息:

cabal-install version 1.24.0.2 compiled using version 1.24.2.0 of the Cabal library 使用Cabal库的1.24.2.0版本编译的cabal-install版本1.24.0.2

On Ubuntu 18.04 在Ubuntu 18.04上

$ ghci

GHCi, version 8.0.2: http://www.haskell.org/ghc/  :? for help

Prelude> import Control.Monad.Par

<no location info>: error:
Could not find module ‘Control.Monad.Par’
Perhaps you meant
  Control.Monad.Fail (from base-4.9.1.0)
  Control.Monad.Fix (from base-4.9.1.0)
  Control.Monad.RWS (needs flag -package-key mtl-2.2.1@mtl-2.2.1-BLKBelFsPB3BoFeSWSOYj6)

Would appreciate any help on how to get Control.Monad.Par to work. 感谢您对如何使Control.Monad.Par起作用的任何帮助。

In general, Could not find module '...' means you don't have the package installed 1 . 通常, Could not find module '...'意味着您没有安装软件包1 You can search the module name on hayoo to get the package name, and then do: 您可以在hayoo上搜索模块名称以获取包名称,然后执行以下操作:

cabal install [package name]

Or if you're using Stack for your project (recommended), you can add the package name to the build-depends section in your *.cabal file. 或者,如果您正在为项目使用Stack (推荐),则可以将包名称添加到*.cabal文件中的build-depends部分。


1 It could also mean you misspelled the module name, the package was installed incorrectly, GHC isn't looking for the package in the place it was installed, or some other weird thing is going on, but I won't go into that. 1这也可能意味着您拼错了模块名称,错误地安装了软件包,GHC不在正在安装的位置寻找软件包,或者发生了其他一些奇怪的事情,但我不会赘述。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM