Sample code to accompany the book "Parallel and Concurrent Programming in Haskell"
Haskell Makefile Other
Latest commit 4ad3cce Jun 2, 2016 @simonmar 0.4.3: Fix build
Failed to load latest commit information.
crc32 Accelerate lab May 18, 2012
distrib-chat Update to the latest distributed-process May 16, 2015
distrib-db Use generic deriving (binary >= 0.6.3) and latest distributed-process Jan 28, 2013
distrib-ping Update to the latest distributed-process May 16, 2015
fwsparse ghc 7.6 fix Feb 27, 2013
index add new parallelism exercise Jun 7, 2012
kmeans Builds with GHC 7.10.1 May 16, 2015
mandel callouts May 20, 2013
other Move examples that are not in the book into other/ May 10, 2013
parinfer Initial stack support, and some updates Jun 2, 2016
.gitignore Initial stack support, and some updates Jun 2, 2016
.travis.yml add Mar 30, 2013
AccelerateCompat.hs Fixes for accelerate-0.14, and bump to 0.3.2 Jan 28, 2014
Async.hs waitAny should be exported from Async. Feb 24, 2013
ByteStringCompat.hs more fixes for GHC 7.4.1 Feb 26, 2013
CasIORef.hs fix for compilation with GHC 7.8 Jun 13, 2014
ChangeLog.md 0.4.3: Fix build Jun 2, 2016
ConcurrentUtils.hs forkFinally was added to base in GHC 7.6 Feb 4, 2013
DistribUtils.hs add a hostname to the slave command Apr 25, 2013
GetURL.hs escape the URI string Jun 17, 2011
LICENSE Move examples that are not in the book into other/ May 10, 2013
Makefile Make sdist work May 10, 2013
README.md Readme tweaks Jun 2, 2016
Setup.hs add a .cabal file, rename some files Nov 27, 2012
Stream.hs fix callouts Apr 19, 2013
Sudoku.hs initial import May 17, 2011
TBQueue.hs TBQueue is part of stm since 2.4. Feb 23, 2013
TBQueue2.hs today's changes: finish conc-stm and on to conc-higher Nov 16, 2012
TChan.hs various tweaks and fixes Feb 26, 2013
TList.hs various tweaks and fixes Feb 26, 2013
TMVar.hs
TQueue.hs tidy up Nov 27, 2012
ThreadPool.hs work from the last couple of days: conc-par and conc-distrib Nov 29, 2012
TimeIt.hs
WindowManager.hs Initial stack support, and some updates Jun 2, 2016
catch-mask.hs add bangs suggested by Andres Feb 26, 2013
catch-mask2.hs various tweaks and fixes Feb 26, 2013
chan.hs
chan2.hs various fixes for GHC 7.4.1 etc. Feb 26, 2013
chan3.hs various fixes; organise by chapter in the .cabal file Feb 26, 2013
chanbench.hs merge kosmikus/stm Feb 26, 2013
chat.hs distributed chat server Dec 19, 2012
deadlock1.hs Add <<sec:deadlock>> Nov 2, 2012
deadlock2.hs Add <<sec:deadlock>> Nov 2, 2012
findpar.hs work from the last couple of days: conc-par and conc-distrib Nov 29, 2012
findpar2.hs work from the last couple of days: conc-par and conc-distrib Nov 29, 2012
findpar3.hs refactoring only Mar 24, 2013
findpar4.hs various fixes; organise by chapter in the .cabal file Feb 26, 2013
findpar5.hs Fix build with GHC 7.8 Jun 2, 2016
findseq.hs refactoring only Mar 25, 2013
fork.hs fixes Feb 20, 2013
fwaccel-gpu.hs Fixes for accelerate-0.14, and bump to 0.3.2 Jan 28, 2014
fwaccel.hs Initial stack support, and some updates Jun 2, 2016
fwdense.hs last round of changes Apr 27, 2013
fwdense1.hs add fwdense and rotateimage Mar 7, 2013
geturls.hs initial import May 17, 2011
geturls1.hs more work on conc-mvar Oct 31, 2012
geturls2.hs Remove superfluous imports. Feb 18, 2013
geturls3.hs fixes Feb 20, 2013
geturls4.hs Remove superfluous imports. Feb 18, 2013
geturls5.hs Whitespace fix (for consistency). Feb 18, 2013
geturls6.hs fixes Feb 20, 2013
geturls7.hs
geturls8.hs Remove redundant imports. Feb 24, 2013
geturls9.hs Remove redundant import. Feb 24, 2013
geturlscancel.hs
geturlscancel2.hs forkFinally was added to base in GHC 7.6 Feb 4, 2013
geturlsfirst.hs various fixes for GHC 7.4.1 etc. Feb 26, 2013
geturlsstm.hs initial import May 17, 2011
logger.hs make it stop properly Apr 16, 2013
miscmodules.hs Initial stack support, and some updates Jun 2, 2016
modifytwo.hs various fixes; organise by chapter in the .cabal file Feb 26, 2013
mvar1.hs add some more code examples Oct 25, 2012
mvar2.hs add some more code examples Oct 25, 2012
mvar3.hs today's work, mainly on conc-mvar Oct 30, 2012
mvar4.hs add a call to traceEventIO Mar 1, 2013
parconc-examples.cabal 0.4.3: Fix build Jun 2, 2016
parlist.hs do the evalList/parList split Mar 6, 2013
parmonad.hs various fixes; organise by chapter in the .cabal file Feb 26, 2013
phonebook.hs fixes Feb 20, 2013
reminders.hs today's work, mainly on conc-mvar Oct 30, 2012
reminders2.hs fixes Feb 20, 2013
rotateimage.hs some refactorings Mar 29, 2013
rpar.hs add rpar examples Jan 31, 2013
rsa-pipeline.hs
rsa.hs more fixes for GHC 7.4.1 Feb 26, 2013
rsa1.hs more fixes for GHC 7.4.1 Feb 26, 2013
rsa2.hs more fixes for GHC 7.4.1 Feb 26, 2013
server.hs move port into the code fragment Apr 16, 2013
server2.hs move port into the code fragment Apr 17, 2013
stack.yaml Initial stack support, and some updates Jun 2, 2016
strat.hs add strat examples Mar 6, 2013
strat2.hs add strat examples Mar 6, 2013
strat3.hs add strat examples Mar 6, 2013
sudoku-par1.hs add Par monad sudoku examples Sep 12, 2011
sudoku-par2.hs use trace sched Apr 16, 2013
sudoku-par3.hs add Par monad sudoku examples Sep 12, 2011
sudoku-par4.hs add Par monad sudoku examples Sep 12, 2011
sudoku1.hs tidy code Jan 17, 2013
sudoku17.1000.txt initial import May 17, 2011
sudoku17.16000.txt add a 16000-problem data set for sudoku Jun 15, 2011
sudoku17.49151.txt initial import May 17, 2011
sudoku2.hs
sudoku3.hs unnecessary import Mar 6, 2013
sudoku4.hs we lost the "evalute (length puzzles)" somewhere Mar 6, 2013
sudoku5.hs the strategies version Mar 6, 2013
threadperf1.hs add <<sec:conc-efficiency>> Nov 2, 2012
threadperf2.hs add <<sec:conc-efficiency>> Nov 2, 2012
timeout.hs add sigs Mar 6, 2013
timeout2.hs add sigs Mar 6, 2013
timetable.hs Builds with GHC 7.10.1 May 16, 2015
timetable1.hs Builds with GHC 7.10.1 May 16, 2015
timetable2.hs Builds with GHC 7.10.1 May 16, 2015
timetable3.hs Builds with GHC 7.10.1 May 16, 2015
tmvar.hs some of conc-stm done Nov 8, 2012
windowman.hs various tweaks and fixes Feb 26, 2013

README.md

This is the sample code to accompany the book Parallel and Concurrent Programming in Haskell (Simon Marlow, O'Reilly 2013).

To build the code on your system, you need either:

Building with Stack

stack build

will build all the executables and install them in a platform-specific subdirectory under .stack-work/install.

Building with Cabal

cabal sandox init
cabal install --only-dependencies
cabal configure
cabal build