Errata

Parallel and Concurrent Programming in Haskell

Errata for Parallel and Concurrent Programming in Haskell

Submit your own errata for this product.

The errata list is a list of errors and their corrections that were found after the product was released.

The following errata were submitted by our customers and have not yet been approved or disproved by the author or editor. They solely represent the opinion of the customer.

Color Key: Serious technical mistake Minor technical mistake Language or formatting error Typo Question Note Update

Version Location Description Submitted by Date submitted
Other Digital Version Sample code

Trying to build parcon-examples-0.3.5 on Windows using cygwin and latest GHC platform (HaskellPlatform-7.10.3-x86_64-setup).

Did the following in cygwin bash terminal:

cabal install --only_dependencies --reinstall
cabal configure
cabal build

Build fails to link geturls1.exe due to undefined references to:
initWinSock
newAcceptParams
acceptDoProc
getWSErrorDescr
shutdownWinSock
__imp_getnameinfo
__imp_getaddrinfo

They seem to be required by HTTP-4000.2.23 and network-2.4.2.3

Any suggestions or hint?

Bulent Basaran  May 18, 2016 
Printed Page xi
top line

the top line is: ...Chapters 4,5,6, and pass:[14...
what does "pass:[14" mean.

patrick lynch  Jan 02, 2017 
Printed Page 206
second code listing (main function)

The code seems to use api's that no longer exist. I was able to get it running by changing it to this:


main = withSocketsDo $ do
sock <- socket AF_INET Stream defaultProtocol -- 1
setSocketOption sock ReuseAddr 1
bind sock (SockAddrInet port (tupleToHostAddress (127, 0, 0, 1)))
listen sock 2
printf "Listening on port %s\n" (show port)
forever $ do -- 2
(clientSock, addr) <- accept sock -- 3
handle <- socketToHandle clientSock ReadWriteMode
printf "Accepted connection from %s\n" (show addr)
forkFinally (talk handle) (\_ -> hClose handle) -- 4

Anonymous  Feb 25, 2024