简体   繁体   中英

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

On 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.

In general, Could not find module '...' means you don't have the package installed 1 . You can search the module name on hayoo to get the package name, and then do:

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.


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.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

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