Newbie : Activating-instaling Parallel feature

GHC : ver. 9.4.8
Cabal ver. 3.10.3.0

Hi Folks,

I’ve been learnign Haskell for few weeks only and want to make my teeth on Paralllel processes.
So I’ve build a new prject. got the App folder and Main.hs runnug fine.

Though when I try to run a sample script using some paraellel code if warns me that I need the parallel module to be installed.

Q1. Does a newer version of Haskell/ghc comes with this installed already

Q2. if not how to install it. I get a partail “installed to be check” msg when tryng to install that on my Linux mint 22 OS.

installing method and results :slight_smile:
in CLI : cabal install parallel

add. step :
cabal install --lib parallel

CHECKING :
ghc-pkg list parallel
/home/mint/.ghcup/ghc/9.4.8/lib/ghc-9.4.8/lib/package.conf.d
(no packages)

I’m no expert so any suggestion to succesfully complete the Parallel module install is welcomed. Also if there is any problem with this feature to be installed, ls let us know… :pray: :wink:

Big Thansk /Terii

Check out ghcup’s first steps and cabal’s getting started guide. They will show you how to set up a Haskell app with dependencies.

This post was flagged by the community and is temporarily hidden.

Somehow I got the parallel CPU priocess to work now after updating some Unix depenacy i guess :slight_smile:

For what it’s worth, I was working with concurrent Haskell lately and had to add:
ghc-options: -Wall -O2 -threaded -rtsopts "-with-rtsopts=-N12"
to my .cabal file. I believe the -threaded tells GHC to use the threaded runtime. The -rtsopts "-with-rtsopts=-N12" tells the runtime to use 12 threads (since I had 12 long running test processes).

Of course my test suite had to have: import Control.Concurrent (forkFinally,newEmptyMVar,putMVar,takeMVar) to do the fancy concurrent things.

Hope this helps.